Comment 0 for bug 1989538

Revision history for this message
JamesLin (jneo8) wrote : keystone bootstrap fail on latest/edge

Keystone bootstrap failure when deploy this bundle:

```
local_overlay_enabled: False

series: jammy
applications:
  keystone-mysql-router:
    charm: ch:mysql-router
    channel: latest/edge
  vault-mysql-router:
    charm: ch:mysql-router
    channel: latest/edge
  mysql-innodb-cluster:
    channel: latest/edge
    charm: ch:mysql-innodb-cluster
    num_units: 3
  keystone:
    charm: ch:keystone
    num_units: 1
    channel: latest/edge
  vault:
    charm: ch:vault
    num_units: 1
    channel: latest/edge
relations:
  - - vault:certificates
    - mysql-innodb-cluster:certificates
  - - vault:certificates
    - keystone:certificates
  - - keystone:shared-db
    - keystone-mysql-router:shared-db
  - - vault:shared-db
    - vault-mysql-router:shared-db
  - - keystone-mysql-router:db-router
    - mysql-innodb-cluster:db-router
  - - vault-mysql-router:db-router
    - mysql-innodb-cluster:db-router
```

Error msg:

```
unit.keystone/0.config-changed logger.go:60 raise CalledProcessError(retcode, cmd)
2022-09-12 01:54:16 WARNING unit.keystone/0.config-changed logger.go:60 subprocess.CalledProcessError: Command '('keystone-manage', 'bootstrap', '--bootstrap-username', '_charm-keystone-admin', '--bootstrap-password', 'RfGNgwLSwVtBPx6dTZ8LpWHm6F3rL9HSC8Cz38tFKFFL7FJRYfNVzjgfqPXxXjHd', '--bootstrap-project-name', 'admin', '--bootstrap-role-name', 'Admin', '--bootstrap-service-name', 'keystone', '--bootstrap-admin-url', 'http://10.5.1.103:35357/v3', '--bootstrap-public-url', 'http://10.5.1.103:5000/v3', '--bootstrap-internal-url', 'http://10.5.1.103:5000/v3', '--bootstrap-region-id', 'RegionOne')' returned non-zero exit status 1
```

In root:

```
root@juju-39d662-zaza-86e9ebd11c76-0:/home/ubuntu# keystone-manage bootstrap --bootstrap-username _charm-keystone-admin --bootstrap-password RfGNgwLSwVtBPx6dTZ8LpWHm6F3rL9HSC8Cz38tFKFFL7FJRYfNVzjgfqPXxXjHd --bootstrap-project-name admin --bootstrap-role-name Admin --bootstrap-service-name keystone --bootstrap-admin-url http://10.5.1.103:35357/v3 --bootstrap-public-url 'http://10.5.1.103:5000/v3 --bootstrap-internal-url 'http://10.5.1.103:5000/v3 --bootstrap-region-id RegionOne
/etc/keystone/fernet-keys/ does not contain keys, use keystone-manage fernet_setup to create Fernet keys.
```

The `key-setup` file didn't exist at `/etc/keystone/`. So this bug is because the keystone bootstrap fire before `key_setup()`

keystone is working fine at yoga/stable & focal series