virtualization/verify_lxd need update to test on ubuntu core
Bug #1918400 reported by
Betty Lin
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Expired
|
Undecided
|
Unassigned |
Bug Description
virtualization/
Now it will be failed because it can't execute 'apt-cache'
To post a comment you must log in.
DEBUG:root: Executing LXD Test 0afhlxc2. 460ec11461e5ca7 de0e0e007ae263f cf4342ba90cf2e3 2ea21c373216a8e 9690/virtualiza tion.py" , line 957, in <module> exit(main( )) 0afhlxc2. 460ec11461e5ca7 de0e0e007ae263f cf4342ba90cf2e3 2ea21c373216a8e 9690/virtualiza tion.py" , line 950, in main 0afhlxc2. 460ec11461e5ca7 de0e0e007ae263f cf4342ba90cf2e3 2ea21c373216a8e 9690/virtualiza tion.py" , line 852, in test_lxd 0afhlxc2. 460ec11461e5ca7 de0e0e007ae263f cf4342ba90cf2e3 2ea21c373216a8e 9690/virtualiza tion.py" , line 661, in __init__ get_distro_ information( )["RELEASE" ] checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3/ dist-packages/ lsb_release. py", line 398, in get_distro_ information release( ) checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3/ dist-packages/ lsb_release. py", line 332, in guess_debian_ release from_apt( ) checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3/ dist-packages/ lsb_release. py", line 237, in guess_release_ from_apt checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3/ dist-packages/ lsb_release. py", line 216, in parse_apt_policy Popen([ 'apt-cache' ,'policy' ], checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3. 8/subprocess. py", line 854, in __init__ _execute_ child(args, executable, preexec_fn, close_fds, checkbox- elgin/8/ checkbox- runtime/ usr/lib/ python3. 8/subprocess. py", line 1702, in _execute_child _type(errno_ num, err_msg, err_filename)
Traceback (most recent call last):
File "/tmp/nest-
sys.
File "/tmp/nest-
args.func(args)
File "/tmp/nest-
lxd_test = LXDTest(template, rootfs)
File "/tmp/nest-
self.os_version = lsb_release.
File "/snap/
distinfo = guess_debian_
File "/snap/
rinfo = guess_release_
File "/snap/
releases = parse_apt_policy()
File "/snap/
policy = subprocess.
File "/snap/
self.
File "/snap/
raise child_exception
FileNotFoundError: [Errno 2] No such file or directory: 'apt-cache'
That is a problem in the lsb_release module where it uses apt-cache to guess certain things.
You'll need to wrap this in a try/except block and find a different way to determine the OS release on Core...
651 class LXDTest(object): tarball = None get_distro_ information( )["RELEASE" ]
652
653 def __init__(self, template=None, rootfs=None):
654 self.rootfs_url = rootfs
655 self.template_url = template
656 self.rootfs_tarball = None
657 self.template_
658 self.name = 'testbed'
659 self.image_alias = uuid4().hex
660 self.default_remote = "ubuntu:"
661 self.os_version = lsb_release.
You'd need to wrap line 661 in a try/except block and fall over to whatever mechanism exists in core to determine the release information typicall provided by lsb_release.