|
|
Created:
4 years, 6 months ago by Shuhei Takahashi Modified:
4 years, 6 months ago CC:
chromium-reviews, elijahtaylor+arcwatch_chromium.org, droger+watchlist_chromium.org, hashimoto+watch_chromium.org, blundell+watchlist_chromium.org, hidehiko+watch_chromium.org, sdefresne+watchlist_chromium.org, lhchavez+watch_chromium.org, oshima+watch_chromium.org, davemoore+watch_chromium.org, yusukes+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@lkgr Target Ref:
refs/pending/heads/master Project:
chromium Visibility:
Public. |
Descriptionarc: Send cryptohome ID on starting ARC instance.
We are soon moving android-data directory from the current
fixed path (/home/chronos/user/android-data) to a path inside
mounted cryptohome (/home/root/<CryptohomeID>/android-data).
To prepare for that change, we start sending cryptohome ID in
StartArcInstance() D-Bus method.
Since we do not use |socket_path| parameter at all in
session_manager today, we will reuse it to pass the cryptohome ID.
BUG=b:26700652
TEST=trybot
TEST=ARC boots
Committed: https://crrev.com/73ba2139159c3225e9d0f28d6066fac07b4fe80a
Cr-Commit-Position: refs/heads/master@{#398232}
Patch Set 1 #
Total comments: 2
Patch Set 2 : Fix gn deps & add comments #Patch Set 3 : Reuse |socket_path|. #
Total comments: 2
Patch Set 4 : s/GetActiveUser/GetPrimaryUser/g #Messages
Total messages: 38 (12 generated)
nya@chromium.org changed reviewers: + dspaid@chromium.org, hashimoto@chromium.org, lhchavez@chromium.org, oshima@chromium.org
hashimoto: PTAL chromeos/ oshima: PTAL chrome/ lhchavez: PTAL all dspaid: FYI (let's chat offline tomorrow)
https://codereview.chromium.org/2023803003/diff/1/chromeos/dbus/session_manag... File chromeos/dbus/session_manager_client.h (right): https://codereview.chromium.org/2023803003/diff/1/chromeos/dbus/session_manag... chromeos/dbus/session_manager_client.h:217: // socket for communication with the instance. Upon completion, invokes Please add a comment about cryptohome_id.
https://codereview.chromium.org/2023803003/diff/1/chromeos/dbus/session_manag... File chromeos/dbus/session_manager_client.h (right): https://codereview.chromium.org/2023803003/diff/1/chromeos/dbus/session_manag... chromeos/dbus/session_manager_client.h:217: // socket for communication with the instance. Upon completion, invokes On 2016/05/30 11:20:17, hashimoto wrote: > Please add a comment about cryptohome_id. Done.
chromeos/dbus lgtm
hmmm that was supposed to be the role of the |socket_path| parameter. Can't you use that? If you cannot use that, it's probably better to remove |socket_path| since it's redundant.
On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > hmmm that was supposed to be the role of the |socket_path| parameter. Can't you > use that? > > If you cannot use that, it's probably better to remove |socket_path| since it's > redundant. IIUC |socket_path| is always a fixed path "/var/run/chrome/arc_bridge.sock". It does not contain any user-id-specific path components. https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... What do you mean by "that was supposed to be the role of the |socket_path| parameter"?
On 2016/05/31 16:54:51, Shuhei Takahashi wrote: > On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > > hmmm that was supposed to be the role of the |socket_path| parameter. Can't > you > > use that? > > > > If you cannot use that, it's probably better to remove |socket_path| since > it's > > redundant. > > IIUC |socket_path| is always a fixed path "/var/run/chrome/arc_bridge.sock". It > does not contain any user-id-specific path components. > > https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... > > What do you mean by "that was supposed to be the role of the |socket_path| > parameter"? At some point it was supposed to be in the data directory. But then it wasn't, so now it's just passing over a constant. As it stands it's unneeded to pass in both parameters, only one is needed.
On 2016/05/31 16:58:33, Luis Héctor Chávez wrote: > On 2016/05/31 16:54:51, Shuhei Takahashi wrote: > > On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > > > hmmm that was supposed to be the role of the |socket_path| parameter. Can't > > you > > > use that? > > > > > > If you cannot use that, it's probably better to remove |socket_path| since > > it's > > > redundant. > > > > IIUC |socket_path| is always a fixed path "/var/run/chrome/arc_bridge.sock". > It > > does not contain any user-id-specific path components. > > > > > https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... > > > > What do you mean by "that was supposed to be the role of the |socket_path| > > parameter"? > > At some point it was supposed to be in the data directory. But then it wasn't, > so now it's just passing over a constant. > > As it stands it's unneeded to pass in both parameters, only one is needed. I see your point. However we can't deprecate |socket_path| immediately in this change because we need several preparation steps to move socket path. I think a rough plan would be: 1. Submit this change as-is (i.e. do nothing with |socket_path|). 2. Modify Chrome to create socket under /home/root/$hash. |socket_path| starts to point the new path, but session_manager still uses it to locate socket. 3. Modify session_manager to construct socket path from |cryptohome_id|, not from |socket_path|. 4. Modify Chrome to send nothing in |socket_path| to deprecate the parameter (or if you know any good way to remove a parameter from D-bus method please let me know). Let me find or create a bug entry to track this issue tomorrow.
On 2016/05/31 17:36:57, Shuhei Takahashi wrote: > On 2016/05/31 16:58:33, Luis Héctor Chávez wrote: > > On 2016/05/31 16:54:51, Shuhei Takahashi wrote: > > > On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > > > > hmmm that was supposed to be the role of the |socket_path| parameter. > Can't > > > you > > > > use that? > > > > > > > > If you cannot use that, it's probably better to remove |socket_path| since > > > it's > > > > redundant. > > > > > > IIUC |socket_path| is always a fixed path "/var/run/chrome/arc_bridge.sock". > > It > > > does not contain any user-id-specific path components. > > > > > > > > > https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... > > > > > > What do you mean by "that was supposed to be the role of the |socket_path| > > > parameter"? > > > > At some point it was supposed to be in the data directory. But then it wasn't, > > so now it's just passing over a constant. > > > > As it stands it's unneeded to pass in both parameters, only one is needed. > > I see your point. However we can't deprecate |socket_path| immediately in this > change because we need several preparation steps to move socket path. > > I think a rough plan would be: > > 1. Submit this change as-is (i.e. do nothing with |socket_path|). > 2. Modify Chrome to create socket under /home/root/$hash. |socket_path| starts > to point the new path, but session_manager still uses it to locate socket. This is not *strictly* needed, since session_manager doesn't even use this parameter :P And there are no plans to use it in the future. > 3. Modify session_manager to construct socket path from |cryptohome_id|, not > from |socket_path|. > 4. Modify Chrome to send nothing in |socket_path| to deprecate the parameter (or > if you know any good way to remove a parameter from D-bus method please let me > know). > > Let me find or create a bug entry to track this issue tomorrow. How about the following alternative: given that it's more painful to modify dbus messages without having them break (since they are just read linearly), just replace |socket_path| with |cryptohome_id| or the fully-built path to /home/user/$hash/ if we don't need to build /home/root/$hash/ as well. It's going to be marshaled as a string anyways and you won't need to do any deprecation steps. You will only need to change session_manager+dbus bindings once to rename the parameter, but that change can happen separately since the parameter name is not needed and is only for documentation.
On 2016/05/31 17:55:55, Luis Héctor Chávez wrote: > On 2016/05/31 17:36:57, Shuhei Takahashi wrote: > > On 2016/05/31 16:58:33, Luis Héctor Chávez wrote: > > > On 2016/05/31 16:54:51, Shuhei Takahashi wrote: > > > > On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > > > > > hmmm that was supposed to be the role of the |socket_path| parameter. > > Can't > > > > you > > > > > use that? > > > > > > > > > > If you cannot use that, it's probably better to remove |socket_path| > since > > > > it's > > > > > redundant. > > > > > > > > IIUC |socket_path| is always a fixed path > "/var/run/chrome/arc_bridge.sock". > > > It > > > > does not contain any user-id-specific path components. > > > > > > > > > > > > > > https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... > > > > > > > > What do you mean by "that was supposed to be the role of the |socket_path| > > > > parameter"? > > > > > > At some point it was supposed to be in the data directory. But then it > wasn't, > > > so now it's just passing over a constant. > > > > > > As it stands it's unneeded to pass in both parameters, only one is needed. > > > > I see your point. However we can't deprecate |socket_path| immediately in this > > change because we need several preparation steps to move socket path. > > > > I think a rough plan would be: > > > > 1. Submit this change as-is (i.e. do nothing with |socket_path|). > > 2. Modify Chrome to create socket under /home/root/$hash. |socket_path| starts > > to point the new path, but session_manager still uses it to locate socket. > > This is not *strictly* needed, since session_manager doesn't even use this > parameter :P And there are no plans to use it in the future. > > > 3. Modify session_manager to construct socket path from |cryptohome_id|, not > > from |socket_path|. > > 4. Modify Chrome to send nothing in |socket_path| to deprecate the parameter > (or > > if you know any good way to remove a parameter from D-bus method please let me > > know). > > > > Let me find or create a bug entry to track this issue tomorrow. > > How about the following alternative: given that it's more painful to modify dbus > messages without having them break (since they are just read linearly), just > replace |socket_path| with |cryptohome_id| or the fully-built path to > /home/user/$hash/ if we don't need to build /home/root/$hash/ as well. It's > going to be marshaled as a string anyways and you won't need to do any > deprecation steps. You will only need to change session_manager+dbus bindings > once to rename the parameter, but that change can happen separately since the > parameter name is not needed and is only for documentation. Oh I did not notice that |socket_path| is not used in session_manager :) Your suggestion to replace |socket_path| with |cryptohome_id| sounds good. I'll revise the patch tomorrow. Thanks!
On 2016/05/31 18:04:09, Shuhei Takahashi wrote: > On 2016/05/31 17:55:55, Luis Héctor Chávez wrote: > > On 2016/05/31 17:36:57, Shuhei Takahashi wrote: > > > On 2016/05/31 16:58:33, Luis Héctor Chávez wrote: > > > > On 2016/05/31 16:54:51, Shuhei Takahashi wrote: > > > > > On 2016/05/31 15:35:23, Luis Héctor Chávez wrote: > > > > > > hmmm that was supposed to be the role of the |socket_path| parameter. > > > Can't > > > > > you > > > > > > use that? > > > > > > > > > > > > If you cannot use that, it's probably better to remove |socket_path| > > since > > > > > it's > > > > > > redundant. > > > > > > > > > > IIUC |socket_path| is always a fixed path > > "/var/run/chrome/arc_bridge.sock". > > > > It > > > > > does not contain any user-id-specific path components. > > > > > > > > > > > > > > > > > > > > https://code.google.com/p/chromium/codesearch#chromium/src/components/arc/arc... > > > > > > > > > > What do you mean by "that was supposed to be the role of the > |socket_path| > > > > > parameter"? > > > > > > > > At some point it was supposed to be in the data directory. But then it > > wasn't, > > > > so now it's just passing over a constant. > > > > > > > > As it stands it's unneeded to pass in both parameters, only one is needed. > > > > > > I see your point. However we can't deprecate |socket_path| immediately in > this > > > change because we need several preparation steps to move socket path. > > > > > > I think a rough plan would be: > > > > > > 1. Submit this change as-is (i.e. do nothing with |socket_path|). > > > 2. Modify Chrome to create socket under /home/root/$hash. |socket_path| > starts > > > to point the new path, but session_manager still uses it to locate socket. > > > > This is not *strictly* needed, since session_manager doesn't even use this > > parameter :P And there are no plans to use it in the future. > > > > > 3. Modify session_manager to construct socket path from |cryptohome_id|, not > > > from |socket_path|. > > > 4. Modify Chrome to send nothing in |socket_path| to deprecate the parameter > > (or > > > if you know any good way to remove a parameter from D-bus method please let > me > > > know). > > > > > > Let me find or create a bug entry to track this issue tomorrow. > > > > How about the following alternative: given that it's more painful to modify > dbus > > messages without having them break (since they are just read linearly), just > > replace |socket_path| with |cryptohome_id| or the fully-built path to > > /home/user/$hash/ if we don't need to build /home/root/$hash/ as well. It's > > going to be marshaled as a string anyways and you won't need to do any > > deprecation steps. You will only need to change session_manager+dbus bindings > > once to rename the parameter, but that change can happen separately since the > > parameter name is not needed and is only for documentation. > > Oh I did not notice that |socket_path| is not used in session_manager :) > > Your suggestion to replace |socket_path| with |cryptohome_id| sounds good. I'll > revise the patch tomorrow. Thanks! holding my review based on the discussion.
nya@chromium.org changed reviewers: + dzhioev@chromium.org
dzhioev: PTAL for DEPS to user_manager others: PTAL again As per discussion with Luis, I've replaced unused |socket_path| with |cryptohome_id|.
Description was changed from ========== arc: Send account ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path containing username hash. To prepare for that change, we start sending account ID in StartArcInstance() D-Bus method. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send account ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path containing username hash. To prepare for that change, we start sending account ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the account ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ==========
lgtm with nit https://codereview.chromium.org/2023803003/diff/40001/chromeos/dbus/session_m... File chromeos/dbus/session_manager_client.h (right): https://codereview.chromium.org/2023803003/diff/40001/chromeos/dbus/session_m... chromeos/dbus/session_manager_client.h:219: virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, Some description about failure case would be helpful.
chromeos/dbus lgtm
https://codereview.chromium.org/2023803003/diff/40001/chromeos/dbus/session_m... File chromeos/dbus/session_manager_client.h (right): https://codereview.chromium.org/2023803003/diff/40001/chromeos/dbus/session_m... chromeos/dbus/session_manager_client.h:219: virtual void StartArcInstance(const cryptohome::Identification& cryptohome_id, On 2016/06/01 02:10:23, oshima wrote: > Some description about failure case would be helpful. Actually it turned out this function does not check dbus error except for no-such-method... Please let me fix it and add comments in another change.
lgtm much better :)
dzhioev: I'm now wondering if user_manager->GetActiveUser() really gives what we want. IIUC "active user" is the user whose desktop is currently being shown, but then what if this code path is executed when multiple users are logged in to the device?
lhchavez: PTAL again for arc_bridge_bootstrap.cc dzhioev: PTAL On 2016/06/02 08:24:31, Shuhei Takahashi wrote: > dzhioev: > > I'm now wondering if user_manager->GetActiveUser() really gives what we want. > IIUC "active user" is the user whose desktop is currently being shown, but then > what if this code path is executed when multiple users are logged in to the > device? It turned the primary user is what we want. Revised the patch.
slgtm
dzhioev: ping?
nya@chromium.org changed reviewers: + alemate@chromium.org
+alemate: PTAL for user_manager DEPS I tried to contact dzhioev but got no response.
not lgtm. Need to discuss.
Description was changed from ========== arc: Send account ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path containing username hash. To prepare for that change, we start sending account ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the account ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to /home/root/<CID>/android-data. To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ==========
Description was changed from ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to /home/root/<CID>/android-data. To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ==========
Description was changed from ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ==========
lgtm. THank you for updating Cl description.
The CQ bit was checked by nya@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from hashimoto@chromium.org, lhchavez@chromium.org, oshima@chromium.org Link to the patchset: https://codereview.chromium.org/2023803003/#ps60001 (title: "s/GetActiveUser/GetPrimaryUser/g")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2023803003/60001
Message was sent while issue was closed.
Description was changed from ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ==========
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Description was changed from ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots Committed: https://crrev.com/73ba2139159c3225e9d0f28d6066fac07b4fe80a Cr-Commit-Position: refs/heads/master@{#398232} ==========
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/73ba2139159c3225e9d0f28d6066fac07b4fe80a Cr-Commit-Position: refs/heads/master@{#398232}
Message was sent while issue was closed.
Description was changed from ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots Committed: https://crrev.com/73ba2139159c3225e9d0f28d6066fac07b4fe80a Cr-Commit-Position: refs/heads/master@{#398232} ========== to ========== arc: Send cryptohome ID on starting ARC instance. We are soon moving android-data directory from the current fixed path (/home/chronos/user/android-data) to a path inside mounted cryptohome (/home/root/<CryptohomeID>/android-data). To prepare for that change, we start sending cryptohome ID in StartArcInstance() D-Bus method. Since we do not use |socket_path| parameter at all in session_manager today, we will reuse it to pass the cryptohome ID. BUG=b:26700652 TEST=trybot TEST=ARC boots Committed: https://crrev.com/73ba2139159c3225e9d0f28d6066fac07b4fe80a Cr-Commit-Position: refs/heads/master@{#398232} ========== |