missing .venv/bin directory on jammy

Bug #1991149 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Neutron API OVN Plugin Charm
Expired
High
Unassigned

Bug Description

missing .venv/bin directory on jammy. This is showing up on: https://review.opendev.org/c/openstack/charm-neutron-api-plugin-arista/+/850206

2022-09-27 18:39:10 DEBUG unit.neutron-mysql-router/0.install logger.go:60 created virtual environment CPython3.10.6.final.0-64 in 588ms
2022-09-27 18:39:10 DEBUG unit.neutron-mysql-router/0.install logger.go:60 creator CPython3Posix(dest=/var/lib/juju/agents/unit-neutron-mysql-router-0/.venv, clear=False, no_vcs_ignore=False, global=False)
2022-09-27 18:39:10 DEBUG unit.neutron-mysql-router/0.install logger.go:60 seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/root/.local/share/virtualenv)
2022-09-27 18:39:10 DEBUG unit.neutron-mysql-router/0.install logger.go:60 added seed packages: pip==22.0.2, setuptools==59.6.0, wheel==0.37.1
2022-09-27 18:39:10 DEBUG unit.neutron-mysql-router/0.install logger.go:60 activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 Traceback (most recent call last):
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/var/lib/juju/agents/unit-neutron-mysql-router-0/charm/hooks/install", line 8, in <module>
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 basic.bootstrap_charm_deps()
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/var/lib/juju/agents/unit-neutron-mysql-router-0/charm/lib/charms/layer/basic.py", line 202, in bootstrap_charm_deps
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 _update_if_newer(pip, pre_install_pkgs)
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/var/lib/juju/agents/unit-neutron-mysql-router-0/charm/lib/charms/layer/basic.py", line 349, in _update_if_newer
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 installed = _load_installed_versions(pip)
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/var/lib/juju/agents/unit-neutron-mysql-router-0/charm/lib/charms/layer/basic.py", line 276, in _load_installed_versions
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 pip_freeze = check_output([pip, 'freeze']).decode('utf8')
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/usr/lib/python3.10/subprocess.py", line 420, in check_output
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/usr/lib/python3.10/subprocess.py", line 501, in run
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 with Popen(*popenargs, **kwargs) as process:
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 self._execute_child(args, executable, preexec_fn, close_fds,
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 raise child_exception_type(errno_num, err_msg, err_filename)
2022-09-27 18:39:10 WARNING unit.neutron-mysql-router/0.install logger.go:60 FileNotFoundError: [Errno 2] No such file or directory: '/var/lib/juju/agents/unit-neutron-mysql-router-0/.venv/bin/pip'

Traceback is also available in pastebin: https://paste.ubuntu.com/p/ZgzwRpcjzN/

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I think this may be something to do with src/layer.yaml specifying 'use_venv: False'

Revision history for this message
Felipe Reyes (freyes) wrote : Re: [Bug 1991149] Re: missing .venv/bin directory on jammy

On Wed, 2022-09-28 at 19:05 +0000, Corey Bryant wrote:
> I think this may be something to do with src/layer.yaml specifying
> 'use_venv: False'
>
I believe you are totally right. Even if this is not the root cause, this is definitively something
that needs to be set to true.

Revision history for this message
Felipe Reyes (freyes) wrote :

although the stacktraces reference neutron-mysql-router/0

Revision history for this message
Felipe Reyes (freyes) wrote :

Setting this bug to 'high' since not running the charm's code in a venv pollutes the system and may be interfering with the functioning of the payload.

Changed in charm-neutron-api-plugin-ovn:
assignee: nobody → Felipe Reyes (freyes)
importance: Undecided → High
Revision history for this message
Felipe Reyes (freyes) wrote :

The testing for this charm relies on arista-virt-test-fixture which is deployed with a VM that runs a arista appliance, so there no logs in the arista-virt-test-fixture/0 unit, the only thing we know is that the API service provided by that appliance couldn't be reached:

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='172.16.0.25', port=443): Max retries exceeded with url: /command-api/ (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7fa214365cd0>: Failed to establish a new connection: [Errno 113] No route to host'))

Revision history for this message
Felipe Reyes (freyes) wrote :
Revision history for this message
Felipe Reyes (freyes) wrote :

I've found no errors, I will set this as incomplete, if we find more evidence we reopen this.

Changed in charm-neutron-api-plugin-ovn:
assignee: Felipe Reyes (freyes) → nobody
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for OpenStack Neutron API OVN Plugin Charm because there has been no activity for 60 days.]

Changed in charm-neutron-api-plugin-ovn:
status: Incomplete → Expired
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.