OpenStack: User

Debug user
openstack user list
openstack user show USER_ID
openstack domain show DOMAIN_ID
openstack project list --user USER_ID
openstack role assignment list --names --user USER_ID

Add role
openstack role add --user USER_ID --project PROJECT_ID creator

LXD: Move / copy container to remote host

Configure LXD
# new server (lxd2.example.com, 10.0.0.22)
lxc config set core.https_address 10.0.0.22:8443
lxc config set core.trust_password pass1234

# old server (lxd1.example.com, 10.0.0.11)
lxc config set core.https_address 10.0.0.11:8443
lxc remote add lxd2.example.com 10.0.0.22

Migrate container
# old server
CONTAINER=www
#lxc config show ${CONTAINER}
lxc stop ${CONTAINER}
lxc config set ${CONTAINER} boot.autostart false
lxc snapshot ${CONTAINER}

# move whole container
# lxc move ${CONTAINER} lxd2.example.com:${CONTAINER} --verbose

OpenStack: Extend public IP range

Show subnet details
openstack subnet list --network public
openstack subnet show public-10.0.0.0/24

Modify database
DB_PASS=$(grep neutron_database_password /etc/kolla/passwords.yml | cut -d " " -f2)
mysql -h db.service.example.com --password=${DB_PASS} -P 6033 -u neutron -D neutron
select * from neutron.subnets where cidr like '10.0.0%';
update subnets set cidr='10.0.0.0/23' WHERE cidr = '10.0.0.0/24';
exit;

# update subnet name
openstack subnet set --name public-10.0.0.0/23 public-10.0.0.0/24

# extend allocation-pool