diff --git a/confluent_osdeploy/common/profile/scripts/functions b/confluent_osdeploy/common/profile/scripts/functions index 92069e6b..27cfa657 100644 --- a/confluent_osdeploy/common/profile/scripts/functions +++ b/confluent_osdeploy/common/profile/scripts/functions @@ -62,6 +62,12 @@ sys.stdout.write(value + '\n') EOF } +# Print deployment.installedargs from a deploycfg, by default +# /etc/confluent/confluent.deploycfg, undoing its yaml single quoting. +function confluent_installedargs() { + sed -n "s/^installedargs: //p" "${1:-/etc/confluent/confluent.deploycfg}" | sed -e "s/^'\(.*\)'\$/\1/" -e "s/''/'/g" +} + function set_confluent_vars() { if [ -z "$nodename" ]; then nodename=$(grep ^NODENAME: /etc/confluent/confluent.info | awk '{print $2}') diff --git a/confluent_osdeploy/debian/profiles/default/scripts/post.sh b/confluent_osdeploy/debian/profiles/default/scripts/post.sh index 2c8c6923..ce7fcd95 100755 --- a/confluent_osdeploy/debian/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/debian/profiles/default/scripts/post.sh @@ -42,6 +42,8 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then fi fi kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//') +nodeargs=$(confluent_installedargs) +if [ -n "$nodeargs" ]; then kargs="${kargs:+$kargs }$nodeargs"; fi if [ ! -z "$kargs" ]; then kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g') sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /etc/default/grub diff --git a/confluent_osdeploy/el7/profiles/default/scripts/pre.sh b/confluent_osdeploy/el7/profiles/default/scripts/pre.sh index 2e28de23..f0a229f0 100644 --- a/confluent_osdeploy/el7/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/el7/profiles/default/scripts/pre.sh @@ -38,6 +38,8 @@ else fi curl -sf https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml > /tmp/instprofile.yaml blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //') +nodeargs=$(sed -n "s/^installedargs: //p" /etc/confluent/confluent.deploycfg | sed -e "s/^'\(.*\)'\$/\1/" -e "s/''/'/g") +if [ -n "$nodeargs" ]; then blargs="${blargs:+$blargs }$nodeargs"; fi if [ ! -z "$blargs" ]; then blargs=' --append="'$blargs'"' fi diff --git a/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py b/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py index 09d13eeb..7aafa584 100644 --- a/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py +++ b/confluent_osdeploy/el8-diskless/profiles/default/scripts/image2disk.py @@ -107,6 +107,11 @@ def set_machine_id(rootdir): swapdev = '/dev/mapper/localstorage-swap' +def append_args(args, newargs): + # newargs go last, and an argument given twice keeps only its last place + merged = args + newargs + return [arg for idx, arg in enumerate(merged) if arg not in merged[idx + 1:]] + def fixup(rootdir, vols): devbymount = {} for vol in vols: @@ -196,6 +201,31 @@ def fixup(rootdir, vols): if arg == 'quiet' or arg.startswith(('console=', 'net.ifnames=', 'biosdevname=')): currcmdline.append(arg) currcmdlinestr = ' '.join(currcmdline) + # installedargs of the profile followed by deployment.installedargs, + # which the OS installers add to the kernel arguments of the installed + # system + profile = None + installedargs = [] + with open('/etc/confluent/confluent.deploycfg') as dcfgin: + for line in dcfgin: + if line.startswith('profile: '): + profile = line[len('profile: '):].strip() + elif line.startswith('installedargs: '): + argstr = line[len('installedargs: '):].strip() + if argstr[:1] == "'" and argstr[-1:] == "'": + argstr = argstr[1:-1].replace("''", "'") + installedargs = argstr.split() + if profile: + try: + profileyaml = subprocess.check_output([ + sys.executable, '/opt/confluent/bin/apiclient', + '/confluent-public/os/{}/profile.yaml'.format(profile)]).decode('utf8') + except (subprocess.CalledProcessError, OSError) as e: + sys.stderr.write('Unable to read the installedargs of profile {}: {}\n'.format(profile, e)) + profileyaml = '' + for line in profileyaml.split('\n'): + if line.startswith('installedargs:'): + installedargs = line.split('#', 1)[0][len('installedargs:'):].split() + installedargs if os.path.exists(grubsyscfg): with open(grubsyscfg) as defgrubin: defgrub = defgrubin.read().split('\n') @@ -213,7 +243,7 @@ def fixup(rootdir, vols): ] if not os.path.exists(os.path.join(rootdir, "etc/kernel/cmdline")): with open(os.path.join(rootdir, "etc/kernel/cmdline"), "w") as cmdlineout: - cmdlineout.write("{} root=/dev/mapper/localstorage-root rd.lvm.lv=localstorage/root".format(currcmdlinestr)) + cmdlineout.write("{} root=/dev/mapper/localstorage-root rd.lvm.lv=localstorage/root".format(' '.join(append_args(currcmdline, installedargs)))) with open(grubsyscfg, 'w') as defgrubout: for gline in defgrub: gline = gline.split() @@ -224,6 +254,10 @@ def fixup(rootdir, vols): newline.append('"') continue newline.append(ent) + if installedargs and newline and newline[0].startswith('GRUB_CMDLINE_LINUX=') and newline[-1].endswith('"'): + # an image captured from an installed node may carry them already + present = ' '.join(newline)[len('GRUB_CMDLINE_LINUX="'):-1].split() + newline = ['GRUB_CMDLINE_LINUX="{}"'.format(' '.join(append_args(present, installedargs)))] defgrubout.write(' '.join(newline) + '\n') grubcfg = subprocess.check_output(['find', os.path.join(rootdir, 'boot'), '-name', 'grub.cfg']).decode('utf8').strip().replace(rootdir, '/').replace('//', '/') grubcfg = grubcfg.split('\n') diff --git a/confluent_osdeploy/el8/profiles/default/scripts/pre.sh b/confluent_osdeploy/el8/profiles/default/scripts/pre.sh index b2c15c7f..2cd0e3ca 100644 --- a/confluent_osdeploy/el8/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/el8/profiles/default/scripts/pre.sh @@ -67,6 +67,8 @@ else fi curl -sf https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml > /tmp/instprofile.yaml blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //') +nodeargs=$(sed -n "s/^installedargs: //p" /etc/confluent/confluent.deploycfg | sed -e "s/^'\(.*\)'\$/\1/" -e "s/''/'/g") +if [ -n "$nodeargs" ]; then blargs="${blargs:+$blargs }$nodeargs"; fi if [ ! -z "$blargs" ]; then blargs=' --append="'$blargs'"' fi diff --git a/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py b/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py index 28b460c3..fb13bd30 100644 --- a/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py +++ b/confluent_osdeploy/el9-diskless/profiles/default/scripts/image2disk.py @@ -124,6 +124,11 @@ def set_machine_id(rootdir): else: os.rename(loadent, newent) +def append_args(args, newargs): + # newargs go last, and an argument given twice keeps only its last place + merged = args + newargs + return [arg for idx, arg in enumerate(merged) if arg not in merged[idx + 1:]] + def fixup(rootdir, vols): devbymount = {} for vol in vols: @@ -216,6 +221,31 @@ def fixup(rootdir, vols): if arg == 'quiet' or arg.startswith(('console=', 'net.ifnames=', 'biosdevname=')): currcmdline.append(arg) currcmdlinestr = ' '.join(currcmdline) + # installedargs of the profile followed by deployment.installedargs, + # which the OS installers add to the kernel arguments of the installed + # system + profile = None + installedargs = [] + with open('/etc/confluent/confluent.deploycfg') as dcfgin: + for line in dcfgin: + if line.startswith('profile: '): + profile = line[len('profile: '):].strip() + elif line.startswith('installedargs: '): + argstr = line[len('installedargs: '):].strip() + if argstr[:1] == "'" and argstr[-1:] == "'": + argstr = argstr[1:-1].replace("''", "'") + installedargs = argstr.split() + if profile: + try: + profileyaml = subprocess.check_output([ + sys.executable, '/opt/confluent/bin/apiclient', + '/confluent-public/os/{}/profile.yaml'.format(profile)]).decode('utf8') + except (subprocess.CalledProcessError, OSError) as e: + sys.stderr.write('Unable to read the installedargs of profile {}: {}\n'.format(profile, e)) + profileyaml = '' + for line in profileyaml.split('\n'): + if line.startswith('installedargs:'): + installedargs = line.split('#', 1)[0][len('installedargs:'):].split() + installedargs kcmdline = os.path.join(rootdir, 'etc/kernel/cmdline') if os.path.exists(kcmdline): with open(kcmdline) as kcmdlinein: @@ -240,7 +270,7 @@ def fixup(rootdir, vols): if arg.startswith(('net.ifnames=', 'biosdevname=')) and arg not in newkcmdlineent: newkcmdlineent.append(arg) with open(kcmdline, 'w') as kcmdlineout: - kcmdlineout.write(' '.join(newkcmdlineent) + '\n') + kcmdlineout.write(' '.join(append_args(newkcmdlineent, installedargs)) + '\n') for loadent in glob.glob(os.path.join(rootdir, 'boot/loader/entries/*.conf')): with open(loadent) as loadentin: currentry = loadentin.read().split('\n') @@ -277,7 +307,7 @@ def fixup(rootdir, vols): newcfgparts.append(cfgpart) else: newcfgparts.append(cfgpart) - loadentout.write(' '.join(newcfgparts) + '\n') + loadentout.write(' '.join(append_args(newcfgparts, installedargs)) + '\n') # the logical volumes this install created, for the defaults below lvmargs = '' for lvdev in (newrootdev, newswapdev): @@ -300,7 +330,7 @@ def fixup(rootdir, vols): ] if not os.path.exists(os.path.join(rootdir, "etc/kernel/cmdline")): with open(os.path.join(rootdir, "etc/kernel/cmdline"), "w") as cmdlineout: - cmdlineout.write("{} root={}{}".format(currcmdlinestr, newrootdev, lvmargs)) + cmdlineout.write("{} root={}{}".format(' '.join(append_args(currcmdline, installedargs)), newrootdev, lvmargs)) with open(grubsyscfg, 'w') as defgrubout: for gline in defgrub: gline = gline.split() @@ -318,6 +348,10 @@ def fixup(rootdir, vols): newline.append(ent) else: newline.append(ent) + if installedargs and newline and newline[0].startswith('GRUB_CMDLINE_LINUX=') and newline[-1].endswith('"'): + # an image captured from an installed node may carry them already + present = ' '.join(newline)[len('GRUB_CMDLINE_LINUX="'):-1].split() + newline = ['GRUB_CMDLINE_LINUX="{}"'.format(' '.join(append_args(present, installedargs)))] defgrubout.write(' '.join(newline) + '\n') grubcfg = subprocess.check_output(['find', os.path.join(rootdir, 'boot'), '-name', 'grub.cfg']).decode('utf8').strip().replace(rootdir, '/').replace('//', '/') grubcfg = grubcfg.split('\n') diff --git a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh index 3cf90b04..5a17bf29 100644 --- a/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh +++ b/confluent_osdeploy/rhvh4/profiles/default/scripts/pre.sh @@ -44,6 +44,8 @@ else fi curl -f https://$mgr/confluent-public/os/$profile/profile.yaml > /tmp/instprofile.yaml blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //') +nodeargs=$(sed -n "s/^installedargs: //p" /etc/confluent/confluent.deploycfg | sed -e "s/^'\(.*\)'\$/\1/" -e "s/''/'/g") +if [ -n "$nodeargs" ]; then blargs="${blargs:+$blargs }$nodeargs"; fi if [ ! -z "$blargs" ]; then blargs=' --append="'$blargs'"' fi diff --git a/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent b/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent index 48b0672f..54a3208f 100755 --- a/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent +++ b/confluent_osdeploy/suse15/initramfs/opt/confluent/bin/suseagent @@ -226,6 +226,8 @@ proto=$(grep ^protocol: /etc/confluent/confluent.deploycfg) proto=${proto#protocol: } append=$(grep ^installedargs: /tmp/profile.yaml | sed -e 's/^installedargs: //' -e 's/#.*//') +nodeargs=$(sed -n "s/^installedargs: //p" /etc/confluent/confluent.deploycfg | sed -e "s/^'\(.*\)'\$/\1/" -e "s/''/'/g") +if [ -n "$nodeargs" ]; then append="${append:+$append }$nodeargs"; fi if grep console= /etc/fakecmdline >& /dev/null && [[ "$append" != *console=* ]]; then append="$append console=${autocons#*/dev/}" fi diff --git a/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh b/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh index 102a78e4..30f7283c 100644 --- a/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh +++ b/confluent_osdeploy/suse16/profiles/server/scripts/pre.sh @@ -46,6 +46,8 @@ sed -i 's@%%ROOTPASSWORD%%@'"$rootpw"'@g' /tmp/autoinstall.json sed -i s!%%NODENAME%%!$(hostname)!g /tmp/autoinstall.json python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/profile.yaml > /tmp/instprofile.yaml blargs=$(grep ^installedargs: /tmp/instprofile.yaml | sed -e 's/#.*//' -e 's/^installedargs: //') +nodeargs=$(confluent_installedargs) +if [ -n "$nodeargs" ]; then blargs="${blargs:+$blargs }$nodeargs"; fi blargs=$(printf '%s' "$blargs" | sed -e 's/[\\"]/\\&/g' -e 's/[\\&!]/\\&/g') sed -i 's!%%INSTALLEDARGS%%!'"$blargs"'!g' /tmp/autoinstall.json python3 /opt/confluent/bin/apiclient /confluent-public/os/$profile/scripts/getinstalldisk > /tmp/getinstalldisk diff --git a/confluent_osdeploy/ubuntu18.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu18.04/profiles/default/scripts/post.sh index 2c8c6923..ce7fcd95 100755 --- a/confluent_osdeploy/ubuntu18.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu18.04/profiles/default/scripts/post.sh @@ -42,6 +42,8 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then fi fi kargs=$(python3 /opt/confluent/bin/apiclient /confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//') +nodeargs=$(confluent_installedargs) +if [ -n "$nodeargs" ]; then kargs="${kargs:+$kargs }$nodeargs"; fi if [ ! -z "$kargs" ]; then kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g') sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /etc/default/grub diff --git a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/image2disk.py b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/image2disk.py index ad76b34e..765d72c1 100644 --- a/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/image2disk.py +++ b/confluent_osdeploy/ubuntu20.04-diskless/profiles/default/scripts/image2disk.py @@ -104,6 +104,11 @@ def set_machine_id(rootdir): swapdev = '/dev/mapper/localstorage-swap' +def append_args(args, newargs): + # newargs go last, and an argument given twice keeps only its last place + merged = args + newargs + return [arg for idx, arg in enumerate(merged) if arg not in merged[idx + 1:]] + def fixup(rootdir, vols): devbymount = {} for vol in vols: @@ -169,6 +174,31 @@ def fixup(rootdir, vols): grubsyscfg = os.path.join(rootdir, 'etc/sysconfig/grub') if not os.path.exists(grubsyscfg): grubsyscfg = os.path.join(rootdir, 'etc/default/grub') + # installedargs of the profile followed by deployment.installedargs, + # which the OS installers add to the kernel arguments of the installed + # system + profile = None + installedargs = [] + with open('/etc/confluent/confluent.deploycfg') as dcfgin: + for line in dcfgin: + if line.startswith('profile: '): + profile = line[len('profile: '):].strip() + elif line.startswith('installedargs: '): + argstr = line[len('installedargs: '):].strip() + if argstr[:1] == "'" and argstr[-1:] == "'": + argstr = argstr[1:-1].replace("''", "'") + installedargs = argstr.split() + if profile: + try: + profileyaml = subprocess.check_output([ + sys.executable, '/opt/confluent/bin/apiclient', + '/confluent-public/os/{}/profile.yaml'.format(profile)]).decode('utf8') + except (subprocess.CalledProcessError, OSError) as e: + sys.stderr.write('Unable to read the installedargs of profile {}: {}\n'.format(profile, e)) + profileyaml = '' + for line in profileyaml.split('\n'): + if line.startswith('installedargs:'): + installedargs = line.split('#', 1)[0][len('installedargs:'):].split() + installedargs with open(grubsyscfg) as defgrubin: defgrub = defgrubin.read().split('\n') with open(grubsyscfg, 'w') as defgrubout: @@ -179,6 +209,10 @@ def fixup(rootdir, vols): if ent.startswith('resume=') or ent.startswith('rd.lvm.lv'): continue newline.append(ent) + if installedargs and newline and newline[0].startswith('GRUB_CMDLINE_LINUX=') and newline[-1].endswith('"'): + # an image captured from an installed node may carry them already + present = ' '.join(newline)[len('GRUB_CMDLINE_LINUX="'):-1].split() + newline = ['GRUB_CMDLINE_LINUX="{}"'.format(' '.join(append_args(present, installedargs)))] defgrubout.write(' '.join(newline) + '\n') grubcfg = subprocess.check_output(['find', os.path.join(rootdir, 'boot'), '-name', 'grub.cfg']).decode('utf8').strip().replace(rootdir, '/').replace('//', '/') grubcfg = grubcfg.split('\n') diff --git a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh index 4ec66bdd..d350c2c4 100755 --- a/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu20.04/profiles/default/scripts/post.sh @@ -47,6 +47,8 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then fi fi kargs=$(curl https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//') +nodeargs=$(confluent_installedargs /target/etc/confluent/confluent.deploycfg) +if [ -n "$nodeargs" ]; then kargs="${kargs:+$kargs }$nodeargs"; fi if [ ! -z "$kargs" ]; then kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g') sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /target/etc/default/grub diff --git a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/post.sh b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/post.sh index e30bf732..6df7b069 100755 --- a/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/post.sh +++ b/confluent_osdeploy/ubuntu22.04/profiles/default/scripts/post.sh @@ -47,6 +47,8 @@ if [ "$textcons" = "true" ] && ! grep console= /proc/cmdline > /dev/null; then fi fi kargs=$(curl https://$confluent_mgr/confluent-public/os/$confluent_profile/profile.yaml | grep ^installedargs: | sed -e 's/^installedargs:[[:space:]]*//' -e 's/#.*//') +nodeargs=$(confluent_installedargs /target/etc/confluent/confluent.deploycfg) +if [ -n "$nodeargs" ]; then kargs="${kargs:+$kargs }$nodeargs"; fi if [ ! -z "$kargs" ]; then kargs=$(printf '%s' "$kargs" | sed -e 's/[\/&]/\\&/g') sed -i 's/GRUB_CMDLINE_LINUX="\([^"]*\)"/GRUB_CMDLINE_LINUX="\1 '"${kargs}"'"/' /target/etc/default/grub diff --git a/confluent_server/confluent/config/attributes.py b/confluent_server/confluent/config/attributes.py index 9e8a0e69..84d9412d 100644 --- a/confluent_server/confluent/config/attributes.py +++ b/confluent_server/confluent/config/attributes.py @@ -218,6 +218,15 @@ node = { 'deployment.client_ip': { 'description': ('Client IP used when most recently reporting state.') }, + 'deployment.installedargs': { + 'description': ('Additional kernel command line arguments for the ' + 'installed OS, appended after the installedargs of ' + 'the profile. They are written to the bootloader ' + 'configuration at install time, and are not applied ' + 'to systems that are already installed. Characters ' + 'that GRUB treats specially, such as &, ;, |, <, >, $ ' + 'and quotes, are not supported.'), + }, 'deployment.kernelargs': { 'description': ('Additional kernel command line arguments to pass at ' 'network boot, appended after the kernelargs of the ' diff --git a/confluent_server/confluent/selfservice.py b/confluent_server/confluent/selfservice.py index 7b678b31..2f8ecd75 100644 --- a/confluent_server/confluent/selfservice.py +++ b/confluent_server/confluent/selfservice.py @@ -49,7 +49,9 @@ def cleanup_inflight_sshcerts(): def yamldump(input): - return yaml.dump_all([input], Dumper=SafeDumper, default_flow_style=False).encode() + # no line wrapping, the deployment scripts read values with grep. This is + # the largest width the libyaml emitter accepts + return yaml.dump_all([input], Dumper=SafeDumper, default_flow_style=False, width=2**31 - 1).encode() def jsondump(input): return json.dumps(input).encode() @@ -319,6 +321,11 @@ async def handle_request(req, make_response, mimetype): 'value', None) if ncfg['encryptboot'] in ('', 'none'): ncfg['encryptboot'] = None + # one line of arguments, the installers read it with grep + installedargs = ' '.join(str(deployinfo.get( + 'deployment.installedargs', {}).get('value', None) or '').split()) + if installedargs: + ncfg['installedargs'] = installedargs ncfg['profile'] = profile protocol = deployinfo.get('deployment.useinsecureprotocols', {}).get( 'value', 'never')