Comment 18 for bug 1680523

Revision history for this message
Tommy Falgout (lastcoolnameleft) wrote : Re: [Bug 1680523] Re: add-credential azure fails

I also tried using an SP and got a different error:

Those logs are at: http://www.lastcoolnameleft.com/mini/azure-sp.log

➜ juju git:(develop) juju add-credential --logging-config '<root>=TRACE'
--log-file=/tmp/azure-sp.log azure
Enter credential name: test

A credential with that name already exists.
Replace the existing credential? (y/N): y

Auth Types
  interactive
  service-principal-secret

Select auth type [interactive]: service-principal-secret

Enter application-id: {{app-id}}

Enter subscription-id: {{sub-id}}

Enter application-password:

Credentials added for cloud azure.

➜ juju git:(develop) cat /tmp/azure-sp.log
22:16:09 INFO juju.cmd supercommand.go:63 running juju [2.2-beta3 gc
go1.8.1]
22:16:09 DEBUG juju.cmd supercommand.go:64 args: []string{"juju",
"add-credential", "--logging-config", "<root>=TRACE",
"--log-file=/tmp/azure-sp.log", "azure"}
22:16:35 INFO cmd supercommand.go:465 command finished
➜ juju git:(develop) juju bootstrap --logging-config '<root>=TRACE'
--log-file=/tmp/azure-sp.log azure
Creating Juju controller "azure-centralus" on azure/centralus
Looking for packaged Juju agent version 2.2-beta3 for amd64
No packaged binary found, preparing local Juju agent binary
ERROR failed to bootstrap model: Juju cannot bootstrap because no agent
binaries are available for your model.
You may want to use the 'agent-metadata-url' configuration setting to
specify the binaries' location.

On Tue, Apr 25, 2017 at 10:24 PM Tommy Falgout <email address hidden>
wrote:

> Andrew,
>
> I just followed the instructions you provided and got further (I think),
> but hit a different error. Details below.
>
> For the logs, you can go to: http://lastcoolnameleft.com/mini/azure.log
>
> ➜ juju git:(develop) juju add-credential --logging-config '<root>=TRACE'
> --log-file=/tmp/azure.log azure
> Enter credential name: test
>
> A credential with that name already exists.
> Replace the existing credential? (y/N): y
>
> Auth Types
> interactive
> service-principal-secret
>
> Select auth type [interactive]:
>
> Enter subscription-id:{{sub-id}}
>
> Initiating interactive authentication.
>
> To sign in, use a web browser to open the page https://aka.ms/devicelogin
> and enter the code {{code}} to authenticate.
>
> Authenticated as "Tommy Falgout".
> Creating/updating service principal.
> ERROR finalizing credential: ad.ServicePrincipalsClient#Create: Failure
> responding to request: StatusCode=0 -- Original Error: autorest/azure:
> Service returned an error. Status=404 Code="Request_ResourceNotFound"
> Message=""
>
>
>
> On Tue, Apr 25, 2017 at 9:25 PM Andrew Wilkins <
> <email address hidden>> wrote:
>
>> My change has landed on the "develop" branch, which is the main branch
>> we all work off. We're expecting to release 2.2-beta3 in the next couple
>> of days, so you can either wait for that, or follow the instructions
>> below to build:
>>
>> 1. install go 1.8. I use the snap package: "sudo snap install go
>> --classic --channel=1.8"
>> 2. install gcc (for some pesky cgo dependencies that I'd like to get rid
>> of...)
>> 3. go get github.com/rogpeppe/godeps
>> 4. go get -d github.com/juju/juju
>> 5. cd ~/go/src/github.com/juju/juju
>> 6. git checkout develop
>> 7. ~/go/bin/godeps -u dependencies.tsv
>> 8. go install github.com/juju/juju/cmd/juju
>>
>> You should now have the "juju" client binary in ~/go/bin, which is
>> enough to run "juju add-credential". If you also want to bootstrap with
>> the develop branch, you should also "go install
>> github.com/juju/juju/cmd/jujud".
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/1680523
>>
>> Title:
>> add-credential azure fails
>>
>> Status in juju:
>> Fix Committed
>>
>> Bug description:
>> I am receiving the following error when running "juju add-credential
>> azure". I have tried two different subscription ID's, both have the
>> same issue.
>>
>> Sign In
>> Sorry, but we’re having trouble signing you in.
>> We received a bad request.
>>
>> Additional technical information:
>> Correlation ID: 9da27091-d4a3-4e93-81e0-41e016d8276a
>> Timestamp: 2017-04-06 16:01:06Z
>> AADSTS90093: Calling principal cannot consent due to lack of
>> permissions.
>>
>> To reproduce the problem:
>>
>> ➜ ~ juju add-credential azure
>> Enter credential name: test
>> A credential with that name already exists.
>>
>> Replace the existing credential? (y/N): y
>> Auth Types
>> interactive*
>> service-principal-secret
>>
>> Select auth-type: interactive
>> Enter subscription-id: <removed>
>> Initiating interactive authentication.
>>
>> To sign in, use a web browser to open the page
>> https://aka.ms/devicelogin and enter the code <removed> to
>> authenticate.
>>
>> -- Go to link
>>
>> Enter the code that you received from the application on your device
>>
>> Juju CLI Application publisher: Click cancel if you received this code
>> from a different application
>>
>> -- Click Continue
>>
>> -- Enter credentials
>>
>> Sorry, but we’re having trouble signing you in.
>> We received a bad request
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/juju/+bug/1680523/+subscriptions
>>
>