Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_smartos fails in a chroot #2452

Closed
ubuntu-server-builder opened this issue May 10, 2023 · 5 comments
Closed

test_smartos fails in a chroot #2452

ubuntu-server-builder opened this issue May 10, 2023 · 5 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

This bug was originally filed in Launchpad as LP: #1316597

Launchpad details
affected_projects = ['cloud-init (Ubuntu)']
assignee = None
assignee_name = None
date_closed = 2014-10-10T15:38:23.643397+00:00
date_created = 2014-05-06T13:12:00.293651+00:00
date_fix_committed = 2014-10-10T15:38:23.643397+00:00
date_fix_released = 2014-10-10T15:38:23.643397+00:00
id = 1316597
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1316597
milestone = None
owner = smoser
owner_name = Scott Moser
private = False
status = fix_released
submitter = juergh
submitter_name = Juerg Haefliger
tags = []
duplicates = [1358026]

Launchpad user Juerg Haefliger(juergh) wrote on 2014-05-06T13:12:00.293651+00:00

All tests from test_smartos.py fail in a chroot as follows (only first failure shown):

$ nosetests tests/unittests/test_datasource/test_smartos.py
FFFFFFFFFFFFFFFFFFFFF

FAIL: test_b64_keys (tests.unittests.test_datasource.test_smartos.TestSmartOSDataSource)

Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/mocker.py", line 146, in test_method_wrapper
result = test_method()
File "/root/cloud-init/tests/unittests/test_datasource/test_smartos.py", line 270, in test_b64_keys
self.assertTrue(ret)
AssertionError: False is not true
-------------------- >> begin captured logging << --------------------
cloudinit.importer: DEBUG: Looking for modules ['cloudinit.mergers.m_list'] that have attributes ['Merger']
cloudinit.importer: DEBUG: Found m_list with attributes ['Merger'] in ['cloudinit.mergers.m_list']
cloudinit.importer: DEBUG: Looking for modules ['cloudinit.mergers.m_dict'] that have attributes ['Merger']
cloudinit.importer: DEBUG: Found m_dict with attributes ['Merger'] in ['cloudinit.mergers.m_dict']
cloudinit.importer: DEBUG: Looking for modules ['cloudinit.mergers.m_str'] that have attributes ['Merger']
cloudinit.importer: DEBUG: Found m_str with attributes ['Merger'] in ['cloudinit.mergers.m_str']
cloudinit.mergers: DEBUG: Merging 'dict' into 'dict' using method '_handle_unknown' of 'LookupMerger: (3)'
cloudinit.mergers: DEBUG: Merging using located merger 'DictMerger: (method=no_replace,recurse_str=False,recurse_dict=True,recurse_array=False,allow_delete=False)' since it had method '_on_dict'
cloudinit.sources.DataSourceSmartOS: DEBUG: Host does not appear to be on SmartOS
--------------------- >> end captured logging << ---------------------

This is because DataSourceSmartOS.get_data() bails out if it can't find the seed (/dev/ttyS1), which obviously doesn't exist in a pbuilder chroot. The check for /dev/ttyS1 needs to be subbed out.

@ubuntu-server-builder ubuntu-server-builder added the launchpad Migrated from Launchpad label May 10, 2023
@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-06-02T20:57:06.546394+00:00

fixed in revno 976

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Charles Plessy(plessy) wrote on 2014-06-02T21:47:11.162399+00:00

Thanks Scott ! This is very timely as Debian's cloud-init package just got http://bugs.debian.org/750314 filed because the package could not be rebuilt in a chroot.

Do you by chance plan an upstream release of cloud-init in the near future ? If not, I will apply revision 976 as a patch to the Debian package.

Have a nice day,

--
Charles

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Launchpad Janitor(janitor) wrote on 2014-06-03T21:05:50.794075+00:00

This bug was fixed in the package cloud-init - 0.7.6~bzr976-0ubuntu1


cloud-init (0.7.6~bzr976-0ubuntu1) utopic; urgency=medium

  • debian/cloud-init.templates: fix choices so dpkg-reconfigure works as
    expected (LP: #1325746)
  • New upstream snapshot.
    • tests: SmartOS test not depend on /dev/ttyS1 device node (LP: #1316597)
    • poll ttyS1 only after check for 'cloudsigma' in dmidecode (LP: #1316475)
    • cloudsigma: support vendor-data (LP: #1303986)
      -- Scott Moser smoser@ubuntu.com Tue, 03 Jun 2014 16:41:07 -0400

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-08-21T16:39:35.280564+00:00

Charles, we'll get a new 0.7.6 sometime in the next few months at the latest.
i'd recommend picking the fix. sorry.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Scott Moser(smoser) wrote on 2014-10-10T15:38:30.379735+00:00

fixed in 0.7.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
launchpad Migrated from Launchpad
Projects
None yet
Development

No branches or pull requests

1 participant