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

Chef module fails to complete when chef_license is specified #3831

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

Comments

@ubuntu-server-builder
Copy link
Collaborator

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

Launchpad details
affected_projects = []
assignee = scahartner
assignee_name = Alex
date_closed = 2021-05-12T14:48:19.291770+00:00
date_created = 2021-01-20T03:09:50.165650+00:00
date_fix_committed = 2021-05-12T14:48:19.291770+00:00
date_fix_released = 2021-05-12T14:48:19.291770+00:00
id = 1912424
importance = undecided
is_complete = True
lp_url = https://bugs.launchpad.net/cloud-init/+bug/1912424
milestone = None
owner = scahartner
owner_name = Alex
private = False
status = fix_released
submitter = scahartner
submitter_name = Alex
tags = ['chef']
duplicates = []

Launchpad user Alex(scahartner) wrote on 2021-01-20T03:09:50.165650+00:00

When the chef_license attribute is specified, the cloud-init run fails to complete as the attribute is interpreted as a path. The suggested fix for this is to move the attribute from CHEF_RB_TPL_PATH_KEYS to CHEF_RB_TPL_DEFAULTS

CHEF_RB_TPL_DEFAULTS = {
# These are ruby symbols...
'ssl_verify_mode': ':verify_none',
'log_level': ':info',
# These are not symbols...
'log_location': '/var/log/chef/client.log',
'validation_key': CHEF_VALIDATION_PEM_PATH,
'validation_cert': None,
'client_key': '/etc/chef/client.pem',
'json_attribs': CHEF_FB_PATH,
'file_cache_path': '/var/cache/chef',
'file_backup_path': '/var/backups/chef',
'pid_file': '/var/run/chef/client.pid',
'show_time': True,
'encrypted_data_bag_secret': None,
}
CHEF_RB_TPL_BOOL_KEYS = frozenset(['show_time'])
CHEF_RB_TPL_PATH_KEYS = frozenset([
'log_location',
'validation_key',
'client_key',
'file_cache_path',
'json_attribs',
'pid_file',
'encrypted_data_bag_secret',
'chef_license',
])

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

Launchpad user Alex(scahartner) wrote on 2021-01-20T05:25:35.979860+00:00

Proposed fix : https://code.launchpad.net/~scahartner/cloud-init/+git/cloud-init/+ref/Fix-1912424/+register-merge

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Mina Galić(minagalic) wrote on 2021-01-20T13:07:03.946993+00:00

please note that patches have moved to github pull requests: https://github.com/canonical/cloud-init/pulls/

see also https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#submitting-your-first-pull-request

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Alex(scahartner) wrote on 2021-01-21T08:36:11.664372+00:00

I am a little lost here. I thought I did that already. Would you be able to take a look at: https://code.launchpad.net/~scahartner/cloud-init/+git/cloud-init/+ref/Fix-1912424 and let me know how I can get this submitted correctly.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Dan Watkins(oddbloke) wrote on 2021-01-26T15:57:21.083828+00:00

Hey Alex, so I think what's happened is you've conflated a couple of parts of our process. If you haven't previously signed the Canonical CLA with your Launchpad ID (which AFAICT is true for you: you haven't), then you don't need to touch Launchpad at all for code submissions any longer. The steps in https://cloudinit.readthedocs.io/en/latest/topics/hacking.html#submitting-your-first-pull-request should guide you through submitting a GitHub pull request with your change.

Does that make sense? If not, feel free to reply here or reach out in #cloud-init on Freenode.

(I've proposed a doc change which will hopefully help folks avoid this confusion in future, if you'd like to take a look: #789)

Thanks!

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Wes Deviers(wdeviers) wrote on 2021-02-19T18:54:35.864476+00:00

Is there any way I can help with this?

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Dan Watkins(oddbloke) wrote on 2021-02-23T20:27:15.646997+00:00

Alex, are you still planning on submitting this via GitHub? Or could someone else pick this up to push forward?

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Alex(scahartner) wrote on 2021-02-24T03:04:06+00:00

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user Ben Hughes(bmhughes) wrote on 2021-04-16T16:51:24.441555+00:00

Ran into this recently and have put a PR in: #868. Pretty sure i've done everything I need to procedure wise.

@ubuntu-server-builder
Copy link
Collaborator Author

Launchpad user James Falcon(falcojr) wrote on 2021-05-12T14:48:28.965071+00:00

This bug is believed to be fixed in cloud-init in version 21.2. 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