Failed to create a user when using juju run-action

Bug #1967046 reported by Gary.Wang
10
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

Revision history for this message
Gary.Wang (gary-wzl77) wrote :

Enable the debug logging and found the following logs
```
curl -vvv -s -X POST -k https://admin:YVW39Tq6xGXdg9g4@10.229.68.230/monitor/api/org/users --data '{"role":"Viewer","loginOrEmail": "doe"}' -H 'Content-Type: application/json'
* Trying 10.229.68.230:443...
* 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/certs/ca-certificates.crt
  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_128_GCM_SHA256
* ALPN, server accepted to use h2
* Server certificate:
* subject: O=appliance.anbox-cloud.io; CN=10.229.68.230
* start date: Feb 17 18:52:35 2022 GMT
* expire date: Feb 17 18:52:35 2023 GMT
* issuer: O=appliance.anbox-cloud.io; CN=10.229.68.230
* 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/api/org/users HTTP/2
> Host: 10.229.68.230
> authorization: Basic YWRtaW46WVZXMzlUcTZ4R1hkZzlnNA==
> 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_STREAMS == 250)!
* 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-type-options: nosniff
< 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","userId":6}

```

Alvaro Uria (aluria)
Changed in charm-grafana:
status: New → In Progress
assignee: nobody → Gary.Wang (gary-wzl77)
importance: Undecided → Low
Revision history for this message
Eric Chen (eric-chen) wrote :

This charm is no longer being actively maintained. Please consider using the new Canonical Observability Stack instead.
(https://charmhub.io/topics/canonical-observability-stack)
I will close this feature request

Changed in charm-grafana:
assignee: Gary.Wang (gary-wzl77) → nobody
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.