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

fix: set feature flag for cloud-init to ignore errors #550

Merged
merged 5 commits into from
Oct 31, 2022

Conversation

fatz
Copy link
Contributor

@fatz fatz commented Oct 26, 2022

What problem does this PR solve?:

  • feature flags for ubuntu 20.04 not set due to regex and version missmatch.
  • on centos 7.9 no featureflags set due to cloud-init sending version string on stderr
  • supersceedes fix: always set feature flag #548

Which issue(s) does this PR fix?:

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

fix: cloud-init feature flags where not set on ubuntu 20.04 leading to images not being usable by CAPI

@fatz fatz changed the title Fix D2IQ-93868 Fix D2IQ-93868 - needs backport to release-1.19 Oct 26, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Oct 26, 2022

File Coverage
All files 15%
pkg/ansible/runner.go 0%
pkg/app/artifacts.go 0%
pkg/app/build.go 0%
pkg/app/build_azure.go 2%
pkg/app/build_gcp.go 0%
pkg/app/config.go 49%
pkg/app/errors.go 0%
pkg/app/provision.go 0%
pkg/app/root.go 0%
pkg/app/utils.go 7%
pkg/app/validate.go 0%
pkg/appansible/io.go 0%
pkg/appansible/playbook.go 0%
pkg/azure/azure.go 0%
pkg/logging/logger.go 0%
pkg/packer/manifest.go 0%
pkg/packer/packer.go 0%
pkg/stringutil/rand.go 0%
pkg/version/info.go 8%

Minimum allowed coverage is 75%

Generated by 🐒 cobertura-action against b5f7b0c

@fatz
Copy link
Contributor Author

fatz commented Oct 26, 2022

so when executing molecule tests centos-7 is failing

fatal: [konvoyimage-centos7.9-julferts-local]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'epel_centos_7
_rpm_gpg_key' is undefined\n\nThe error appears to be in '/Users/julferts/golang/src/github.com/mesosphere/konvoy-image-builder/ansible/roles/repo/tasks
/redhat.yaml': line 44, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n\n- n
ame: add epel gpg key for centos 7\n  ^ here\n"}

this seems to be related to main branch as #551 works absolutely fine

@dkoshkin dkoshkin requested a review from faiq October 26, 2022 20:29
@fatz
Copy link
Contributor Author

fatz commented Oct 26, 2022

the fatal above is due to missing defaults in repo role. #482 removed defaults from GPU module as that role was included by defaults its defaults where used by the repo role. The last commit makes it clear and removes external role dependencies of the repo role

@faiq faiq changed the title Fix D2IQ-93868 - needs backport to release-1.19 fix: set feature flag for cloud-init Oct 31, 2022
@github-actions github-actions bot added the fix label Oct 31, 2022
@faiq faiq force-pushed the julferts/fix-D2IQ-93868-main branch from eebb834 to b5f7b0c Compare October 31, 2022 18:37
@faiq faiq changed the title fix: set feature flag for cloud-init fix: set feature flag for cloud-init to ignore errors Oct 31, 2022
@github-actions github-actions bot added fix and removed fix labels Oct 31, 2022
@faiq faiq merged commit b20f671 into main Oct 31, 2022
@faiq faiq deleted the julferts/fix-D2IQ-93868-main branch October 31, 2022 19:09
faiq added a commit that referenced this pull request Oct 31, 2022
* add test for D2IQ-93868 checking cloud-init feature flags

* simplify version regex match and use `version()` function for version matching

* use supported platforms for molecule testing

* fix: set missing defaults for repo role

* fix: formatting

Co-authored-by: faiq <faiqrazarizvi@gmail.com>
faiq added a commit that referenced this pull request Oct 31, 2022
* add test for D2IQ-93868 checking cloud-init feature flags

* simplify version regex match and use `version()` function for version matching

* use supported platforms for molecule testing

* fix: set missing defaults for repo role

* fix: set feature flag for cloud-init to ignore errors (#550)

* add test for D2IQ-93868 checking cloud-init feature flags

* simplify version regex match and use `version()` function for version matching

* use supported platforms for molecule testing

* fix: set missing defaults for repo role

* fix: formatting

Co-authored-by: faiq <faiqrazarizvi@gmail.com>

Co-authored-by: faiq <faiqrazarizvi@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants