-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add set controller to the management canister #51
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p-shahi
commented
Sep 24, 2020
p-shahi
commented
Sep 24, 2020
3 tasks
3 tasks
hansl
approved these changes
Sep 24, 2020
Hm seems merging is still blocked @hansl |
mergify bot
pushed a commit
to dfinity/sdk
that referenced
this pull request
Sep 28, 2020
This adds the `dfx canister set-controller` subcommand ``` ➜ hello git:(master) dfx canister set-controller --help dfx-canister-set-controller Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network. USAGE: dfx canister set-controller <canister> <new-controller> FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: <canister> Specifies the canister name or the canister identifier for the canister to be controlled. <new-controller> Specifies the identity name or the principal of the new controller. ``` An example use case: ``` ➜ hello git:(master) dfx identity whoami default ➜ hello git:(master) dfx identity list default * prithvi ➜ hello git:(master) dfx canister create hello Creating canister "hello"... "hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q" ➜ hello git:(master) dfx build hello Building canisters... ➜ hello git:(master) ➜ hello git:(master) dfx canister set-controller hello prithvi Set "prithvi" as controller of "hello". ➜ hello git:(master) ➜ hello git:(master) dfx canister install hello Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it. Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae ``` Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch) - [x] push local e2e tests which is blocked because of #1057 (comment) - [ ] update to a replica version which doesn't expose the expected controller's principal - [x] update to agent-rs after this is merged dfinity/agent-rs#51
ericswanson-dfinity
pushed a commit
to dfinity/sdk
that referenced
this pull request
Oct 6, 2020
This adds the `dfx canister set-controller` subcommand ``` ➜ hello git:(master) dfx canister set-controller --help dfx-canister-set-controller Sets the provided identity's name or its principal as the new controller of a canister on the Internet Computer network. USAGE: dfx canister set-controller <canister> <new-controller> FLAGS: -h, --help Prints help information -V, --version Prints version information ARGS: <canister> Specifies the canister name or the canister identifier for the canister to be controlled. <new-controller> Specifies the identity name or the principal of the new controller. ``` An example use case: ``` ➜ hello git:(master) dfx identity whoami default ➜ hello git:(master) dfx identity list default * prithvi ➜ hello git:(master) dfx canister create hello Creating canister "hello"... "hello" canister created with canister id: "75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q" ➜ hello git:(master) dfx build hello Building canisters... ➜ hello git:(master) ➜ hello git:(master) dfx canister set-controller hello prithvi Set "prithvi" as controller of "hello". ➜ hello git:(master) ➜ hello git:(master) dfx canister install hello Installing code for canister hello, with canister_id 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q Replica error (code 5): IC0512: Only the controller of canister 75hes-oqbaa-aaaaa-aaaaa-aaaaa-aaaaa-aaaaa-q can control it. Expected controller: jxpuf-o4cfi-2zfqa-3svif-yxdiz-tuj3p-ctl6m-qsrfv-7zctw-z3bwc-2ae Actual controller: 5gg4n-o6ooe-5zmlh-ac2kx-ntmkd-kamti-a3rqe-okecn-knil3-ord3t-mae ``` Note: Waiting for #1056 to get merged first (therefore, creating a PR against that branch) - [x] push local e2e tests which is blocked because of #1057 (comment) - [ ] update to a replica version which doesn't expose the expected controller's principal - [x] update to agent-rs after this is merged dfinity/agent-rs#51
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.