Deploying openstack

I’m trying to deploy openstack with the this charm openstack lxd | Juju , unfortunately units cannot be installed due to the following errors :

ubuntu@juju-9711e5-7-lxd-2:/var/lib/juju/agents/unit-openstack-dashboard-1/charm$ ./hooks/install
dpkg-query: error: --status needs a valid package name but ‘python-dnspython,’ is not: illegal package name in specifier ‘python-dnspython,’: character ‘,’ not allowed (only letters, digits and characters ‘-+._’)

Use --help for help about querying packages.
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
dpkg-query: package ‘python-apache2’ is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
Traceback (most recent call last):
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/hooks/install.real”, line 109, in
CONFIGS = register_configs()
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/hooks/horizon_utils.py”, line 179, in register_configs
release = os_release(‘openstack-dashboard’)
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 508, in os_release
get_os_codename_package(package, fatal=False) or
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 392, in get_os_codename_package
if snap_install_requested():
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/core/hookenv.py”, line 77, in wrapper
res = func(*args, **kwargs)
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 1657, in snap_install_requested
origin = config(‘openstack-origin’) or “”
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/core/hookenv.py”, line 411, in config
subprocess.check_output(config_cmd_line).decode(‘UTF-8’))
File “/usr/lib/python3.6/subprocess.py”, line 356, in check_output
**kwargs).stdout
File “/usr/lib/python3.6/subprocess.py”, line 423, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.6/subprocess.py”, line 729, in init
restore_signals, start_new_session)
File “/usr/lib/python3.6/subprocess.py”, line 1364, in execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘config-get’: ‘config-get’
ubuntu@juju-9711e5-7-lxd-2:/var/lib/juju/agents/unit-openstack-dashboard-1/charm$ sudo ./hooks/install
dpkg-query: error: --status needs a valid package name but ‘python-dnspython,’ is not: illegal package name in specifier ‘python-dnspython,’: character ‘,’ not allowed (only letters, digits and characters '-+.
’)

Use --help for help about querying packages.
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python-dnspython,
dpkg-query: package ‘python-apache2’ is not installed and no information is available
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: Unable to locate package python-apache2
Traceback (most recent call last):
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/hooks/install.real”, line 109, in
CONFIGS = register_configs()
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/hooks/horizon_utils.py”, line 179, in register_configs
release = os_release(‘openstack-dashboard’)
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 508, in os_release
get_os_codename_package(package, fatal=False) or
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 392, in get_os_codename_package
if snap_install_requested():
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/core/hookenv.py”, line 77, in wrapper
res = func(*args, **kwargs)
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/contrib/openstack/utils.py”, line 1657, in snap_install_requested
origin = config(‘openstack-origin’) or “”
File “/var/lib/juju/agents/unit-openstack-dashboard-1/charm/charmhelpers/core/hookenv.py”, line 411, in config
subprocess.check_output(config_cmd_line).decode(‘UTF-8’))
File “/usr/lib/python3.6/subprocess.py”, line 356, in check_output
**kwargs).stdout
File “/usr/lib/python3.6/subprocess.py”, line 423, in run
with Popen(*popenargs, **kwargs) as process:
File “/usr/lib/python3.6/subprocess.py”, line 729, in init
restore_signals, start_new_session)
File “/usr/lib/python3.6/subprocess.py”, line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: ‘config-get’: ‘config-get’

This might be a bug in the openstack-dashboard charm itself.
It would be worth filing a bug .

I don’t think it is only dashboard problem , all has the same issue please look at the image.

I would be happy if you let me know whether there is a command to list applications in specific model ?

Also if there is a re-run application model or something similar, the purpose is to rerun the installation procedure if I changed the something in underlying machines’ configuration.

For example, I forgot to add a secondary disk for openstack installation and the whole ceph units got stuck in " No block devices detected using current configuration " as result the installation did not complete and then I had to destroy the model and start from the beginning again.

So looking at the tracebacks provided:

is bug 1799500 that was fixed and released in the openstack-dashboard charm revision 274 (the bundle installs 271).

However, this part:

looks quite odd to me in that it seems to indicate that the juju provided binary of config-get could not be found on the path.

If you are looking to deploy openstack-on-lxd, might I suggest going through the in-depth readme available in the openstack-on-lxd repository.

The bundle itself needs to be updated in the charmstore as its pinning some older versions, but the ones available in the openstack-on-lxd repository should place you in better shape.

I deleted that model and installed base openstack from the following charm

cs:bundle/openstack-base-70

Everything is green except ovn-chassis which Cannot find device “eno2” on my machine which actually has 2 NICs.

Cannot find device “eno2”
Traceback (most recent call last):
File “./hooks/update-status”, line 22, in
main()
File “/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.8/site-packages/charms/reactive/init.py”, line 74, in main
bus.dispatch(restricted=restricted_mode)
File “/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py”, line 390, in dispatch
_invoke(other_handlers)
File “/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py”, line 359, in _invoke
handler.invoke()
File “/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py”, line 181, in invoke
self._action(*args)
File “/var/lib/juju/agents/unit-ovn-chassis-0/charm/reactive/ovn_chassis_charm_handlers.py”, line 79, in configure_bridges
charm_instance.configure_bridges()
File “lib/charms/ovn_charm.py”, line 592, in configure_bridges
ch_ovs.add_bridge_port(br, port,
File “/var/lib/juju/agents/unit-ovn-chassis-0/.venv/lib/python3.8/site-packages/charmhelpers/contrib/network/ovs/init.py”, line 246, in add_bridge_port
subprocess.check_call([“ip”, “link”, “set”, port, “up”])
File “/usr/lib/python3.8/subprocess.py”, line 364, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘ip’, ‘link’, ‘set’, ‘eno2’, ‘up’]’ returned non-zero exit status 1.

@billy-olsen ,

To be honest I found out what I have missed during the deployment, I did not changed the network interface variable during the deployment.

variables:
  openstack-origin:    &openstack-origin     distro
  data-port:           &data-port            br-ex:eno2
  worker-multiplier:   &worker-multiplier    0.25
  osd-devices:         &osd-devices          /dev/sdb /dev/vdb

The question is: can I change the nic name now?

Alireza, you can try this (if eno2 is the interface):

juju config ovn-chassis bridge-interface-mappings=br-ex:eno2