Skip to content

Chef module fails to complete when chef_license is specified #3831

@ubuntu-server-builder

Description

@ubuntu-server-builder

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',
])

Metadata

Metadata

Assignees

No one assigned

    Labels

    launchpadMigrated from Launchpad

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions