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

opennebula: fail to sbuild, bash environment var failure EPOCHREALTIME #3318

Closed
ubuntu-server-builder opened this issue May 11, 2023 · 2 comments
Labels
launchpad Migrated from Launchpad

Comments

@ubuntu-server-builder
Copy link
Collaborator

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

Launchpad details
affected_projects = []
assignee = chad.smith
assignee_name = Chad Smith
date_closed = 2019-05-10T18:07:59.045544+00:00
date_created = 2019-01-26T06:07:50.105984+00:00
date_fix_committed = 2019-01-26T15:06:47.132680+00:00
date_fix_released = 2019-05-10T18:07:59.045544+00:00
id = 1813383
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1813383
milestone = None
owner = chad.smith
owner_name = Chad Smith
private = False
status = fix_released
submitter = chad.smith
submitter_name = Chad Smith
tags = []
duplicates = []

Launchpad user Chad Smith(chad.smith) wrote on 2019-01-26T06:07:50.105984+00:00

unittests are failing during packaging of cloud-init on disco during an sbuild due to failures in OpenNebula datasource unit tests.

Unit tests are now seeing EPOCHREALTIME values returned because those env values have changed across the unit test run.

OpenNebula datasource tries to exclude known bash -e env values that are known to change. and EPOCHREALTIME is one of the expected env variables that should continue to have a value delta.

======================================================================
FAIL: tests.unittests.test_datasource.test_opennebula.TestOpenNebulaDataSource.test_context_parser

Traceback (most recent call last):
File "/<>/tests/unittests/test_datasource/test_opennebula.py", line 161, in test_context_parser
self.assertEqual(TEST_VARS, results['metadata'])
AssertionError: {'VAR1': 'single', 'VAR2': 'double word', '[207 chars] '$'} != {'EPOCHREALTIME': '1548476675.477863', 'VAR[245 chars]e\n'}

  • {'EPOCHREALTIME': '1548476675.477863',
  • {'VAR1': 'single',
    ? ^
  • 'VAR1': 'single',
    ? ^

    'VAR10': '\',
    'VAR11': "'",
    'VAR12': '$',
    'VAR2': 'double word',
    'VAR3': 'multi\nline\n',
    'VAR4': "'single'",
    'VAR5': "'double word'",
    'VAR6': "'multi\nline\n'",
    'VAR7': 'single\t',
    'VAR8': 'double\tword',
    'VAR9': 'multi\t\nline\n'}
    -------------------- >> begin captured logging << --------------------
    cloudinit.util: DEBUG: Reading from /tmp/ci-TestOpenNebulaDataSource.ms6gmudd/seed/opennebula/context.sh (quiet=False)
    cloudinit.util: DEBUG: Read 262 bytes from /tmp/ci-TestOpenNebulaDataSource.ms6gmudd/seed/opennebula/context.sh
    cloudinit.util: DEBUG: Running command ['bash', '-e'] with allowed return codes [0] (shell=False, capture=True)
    --------------------- >> end captured logging << ---------------------

======================================================================
FAIL: tests.unittests.test_datasource.test_opennebula.TestOpenNebulaDataSource.test_seed_dir_empty1_context

Traceback (most recent call last):
File "/<>/tests/unittests/test_datasource/test_opennebula.py", line 140, in test_seed_dir_empty1_context
self.assertEqual(results['metadata'], {})
AssertionError: {'EPOCHREALTIME': '1548476675.848343'} != {}

  • {'EPOCHREALTIME': '1548476675.848343'}
  • {}
    -------------------- >> begin captured logging << --------------------
    cloudinit.util: DEBUG: Reading from /tmp/ci-TestOpenNebulaDataSource.gu1w3vu_/seed/opennebula/context.sh (quiet=False)
    cloudinit.util: DEBUG: Read 0 bytes from /tmp/ci-TestOpenNebulaDataSource.gu1w3vu_/seed/opennebula/context.sh
    cloudinit.util: DEBUG: Running command ['bash', '-e'] with allowed return codes [0] (shell=False, capture=True)
    --------------------- >> end captured logging << ---------------------

======================================================================
FAIL: tests.unittests.test_datasource.test_opennebula.TestOpenNebulaDataSource.test_seed_dir_empty2_context

Traceback (most recent call last):
File "/<>/tests/unittests/test_datasource/test_opennebula.py", line 147, in test_seed_dir_empty2_context
self.assertEqual(results['metadata'], {})
AssertionError: {'EPOCHREALTIME': '1548476675.863058'} != {}

  • {'EPOCHREALTIME': '1548476675.863058'}
  • {}
    -------------------- >> begin captured logging << --------------------
    cloudinit.util: DEBUG: Reading from /tmp/ci-TestOpenNebulaDataSource.b3f_3ztm/seed/opennebula/context.sh (quiet=False)
    cloudinit.util: DEBUG: Read 44 bytes from /tmp/ci-TestOpenNebulaDataSource.b3f_3ztm/seed/opennebula/context.sh
    cloudinit.util: DEBUG: Running command ['bash', '-e'] with allowed return codes [0] (shell=False, capture=True)
    --------------------- >> end captured logging << ---------------------

======================================================================
FAIL: test_no_seconds (tests.unittests.test_datasource.test_opennebula.TestParseShellConfig)

Traceback (most recent call last):
File "/<>/tests/unittests/test_datasource/test_opennebula.py", line 921, in test_no_seconds
self.assertEqual(ret, {"foo": "bar", "xx": "foo"})
AssertionError: {'foo': 'bar', 'xx': 'foo', 'EPOCHREALTIME': '1548476676.329965'} != {'foo': 'bar', 'xx': 'foo'}

  • {'EPOCHREALTIME': '1548476676.329965', 'foo': 'bar', 'xx': 'foo'}
  • {'foo': 'bar', 'xx': 'foo'}
    -------------------- >> begin captured logging << --------------------
    cloudinit.util: DEBUG: Running command ['bash', '-e'] with allowed return codes [0] (shell=False, capture=True)
    --------------------- >> end captured logging << ---------------------

Ran 1897 tests in 20.582s

FAILED (SKIP=10, failures=4)
make[2]: *** [Makefile:54: unittest3] Error 1
make[2]: Leaving directory '/<>'
make[1]: *** [debian/rules:11: override_dh_auto_test] Error 2
make[1]: Leaving directory '/<>'
make: *** [debian/rules:7: build] Error 2
dpkg-buildpackage: error: debian/rules build subprocess returned exit status 2

Build finished at 2019-01-26T04:24:51Z

Finished

+------------------------------------------------------------------------------+
| Cleanup |
+------------------------------------------------------------------------------+

Not cleaning session: cloned chroot in use
Keeping session: disco-amd64-9e2df49d-994c-41d4-85bf-b294a78a643c
E: Build failure (dpkg-buildpackage died)

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

Launchpad user Server Team CI bot(server-team-bot) wrote on 2019-01-26T15:06:45.791366+00:00

This bug is fixed with commit d1a2fe7 to cloud-init on branch master.
To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=d1a2fe73

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Chad Smith(chad.smith) wrote on 2019-05-10T18:08:00.408341+00:00

This bug is believed to be fixed in cloud-init in version 19.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

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