Failed to create a user when using juju run-action
Bug #1967046 reported by
Gary.Wang
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Grafana Charm |
Won't Fix
|
Low
|
Unassigned |
Bug Description
Following the documentation, trying to create a user but failed in the end.
```
$ juju run-action --\wait grafana/0 create-user name="doe" <email address hidden>" login="doe" password="redacted" role="Viewer"
unit-grafana-0:
UnitId: grafana/0
id: "54"
message: Failed to add user to organisation
results:
created: doe
status: failed
timing:
completed: 2022-03-30 03:27:28 +0000 UTC
enqueued: 2022-03-30 03:27:23 +0000 UTC
started: 2022-03-30 03:27:27 +0000 UTC
```
Related branches
~gary-wzl77/charm-grafana:fix-1967046
On hold
for merging
into
charm-grafana:master
- Alvaro Uria (community): Needs Fixing
- BootStack Reviewers: Pending (mr tracking; do not claim) requested
- BootStack Reviewers: Pending requested
- BootStack Reviewers: Pending requested
-
Diff: 96 lines (+25/-20)2 files modifiedsrc/README.md (+1/-1)
src/actions/create-user (+24/-19)
Changed in charm-grafana: | |
status: | New → In Progress |
assignee: | nobody → Gary.Wang (gary-wzl77) |
importance: | Undecided → Low |
To post a comment you must log in.
Enable the debug logging and found the following logs /admin: YVW39Tq6xGXdg9g 4@10.229. 68.230/ monitor/ api/org/ users --data '{"role" :"Viewer" ,"loginOrEmail" : "doe"}' -H 'Content-Type: application/json' 68.230: 443... certs/ca- certificates. crt 128_GCM_ SHA256 anbox-cloud. io; CN=10.229.68.230 anbox-cloud. io; CN=10.229.68.230 api/org/ users HTTP/2 UcTZ4R1hkZzlnNA == _STREAMS == 250)! type-options: nosniff ,"userId" :6}
```
curl -vvv -s -X POST -k https:/
* Trying 10.229.
* TCP_NODELAY set
* Connected to 10.229.68.230 (10.229.68.230) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_
* ALPN, server accepted to use h2
* Server certificate:
* subject: O=appliance.
* start date: Feb 17 18:52:35 2022 GMT
* expire date: Feb 17 18:52:35 2023 GMT
* issuer: O=appliance.
* SSL certificate verify result: self signed certificate (18), continuing anyway.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Server auth using Basic with user 'admin'
* Using Stream ID: 1 (easy handle 0xaaaaf992c730)
> POST /monitor/
> Host: 10.229.68.230
> authorization: Basic YWRtaW46WVZXMzl
> user-agent: curl/7.68.0
> accept: */*
> content-type: application/json
> content-length: 39
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* Connection state changed (MAX_CONCURRENT
* We are completely uploaded and fine
< HTTP/2 409
< cache-control: no-cache
< content-type: application/json
< date: Wed, 30 Mar 2022 03:30:21 GMT
< expires: -1
< pragma: no-cache
< x-content-
< x-frame-options: deny
< x-xss-protection: 1; mode=block
< content-length: 68
<
* Connection #0 to host 10.229.68.230 left intact
{"message":"User is already member of this organization"
```