From cafb63af48d7a9d26b14ba4ccc5a04ca6fdc7e55 Mon Sep 17 00:00:00 2001 From: Dmitry Shmulevich Date: Mon, 7 May 2018 14:15:07 -0700 Subject: [PATCH] fix dcos 1.11 template for preprovision extension --- parts/dcos/bstrap/bootstrapcustomdata.yml | 2 +- parts/dcos/bstrap/dcoscustomdata111.t | 38 +++++++++++------------ pkg/acsengine/engine.go | 2 -- 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/parts/dcos/bstrap/bootstrapcustomdata.yml b/parts/dcos/bstrap/bootstrapcustomdata.yml index 738fd4ed01..8e24aaa2f3 100644 --- a/parts/dcos/bstrap/bootstrapcustomdata.yml +++ b/parts/dcos/bstrap/bootstrapcustomdata.yml @@ -22,7 +22,7 @@ mounts: - /var/lib/mesos - - ephemeral0.2 - /var/lib/docker -runcmd: PREPROVISION_EXTENSION +runcmd: - [ ln, -s, /bin/rm, /usr/bin/rm ] - [ ln, -s, /bin/mkdir, /usr/bin/mkdir ] - [ ln, -s, /bin/tar, /usr/bin/tar ] diff --git a/parts/dcos/bstrap/dcoscustomdata111.t b/parts/dcos/bstrap/dcoscustomdata111.t index 3f0a868fd1..ad74dbf0c8 100644 --- a/parts/dcos/bstrap/dcoscustomdata111.t +++ b/parts/dcos/bstrap/dcoscustomdata111.t @@ -1,5 +1,3 @@ -#cloud-config - bootcmd: - bash -c "if [ ! -f /var/lib/sdb-gpt ];then echo DCOS-5890;parted -s /dev/sdb mklabel gpt;touch /var/lib/sdb-gpt;fi" @@ -23,24 +21,24 @@ mounts: - - ephemeral0.2 - /var/lib/docker runcmd: PREPROVISION_EXTENSION - - [ ln, -s, /bin/rm, /usr/bin/rm ] - - [ ln, -s, /bin/mkdir, /usr/bin/mkdir ] - - [ ln, -s, /bin/tar, /usr/bin/tar ] - - [ ln, -s, /bin/ln, /usr/bin/ln ] - - [ ln, -s, /bin/cp, /usr/bin/cp ] - - [ ln, -s, /bin/systemctl, /usr/bin/systemctl ] - - [ ln, -s, /bin/mount, /usr/bin/mount ] - - [ ln, -s, /bin/bash, /usr/bin/bash ] - - [ ln, -s, /usr/sbin/useradd, /usr/bin/useradd ] - - [ systemctl, disable, --now, resolvconf.service ] - - [ systemctl, mask, --now, lxc-net.service ] - - [ systemctl, disable, --now, unscd.service ] - - [ systemctl, stop, --now, unscd.service ] - - /opt/azure/containers/provision.sh - - [ systemctl, start, dcos-docker-install.service ] - - [ systemctl, restart, systemd-journald.service ] - - [ bash, /tmp/dcos/dcos_install.sh, ROLENAME ] - - [ bash, /opt/azure/dcos/diagnostics_fix.sh ] +- ln -s /bin/rm /usr/bin/rm +- ln -s /bin/mkdir /usr/bin/mkdir +- ln -s /bin/tar /usr/bin/tar +- ln -s /bin/ln /usr/bin/ln +- ln -s /bin/cp /usr/bin/cp +- ln -s /bin/systemctl /usr/bin/systemctl +- ln -s /bin/mount /usr/bin/mount +- ln -s /bin/bash /usr/bin/bash +- ln -s /usr/sbin/useradd /usr/bin/useradd +- systemctl disable --now resolvconf.service +- systemctl mask --now lxc-net.service +- systemctl disable --now unscd.service +- systemctl stop --now unscd.service +- /opt/azure/containers/provision.sh +- systemctl start dcos-docker-install.service +- systemctl restart systemd-journald.service +- bash /tmp/dcos/dcos_install.sh ROLENAME +- bash /opt/azure/dcos/diagnostics_fix.sh write_files: - content: | [Unit] diff --git a/pkg/acsengine/engine.go b/pkg/acsengine/engine.go index beb4657a32..b6d2af215d 100644 --- a/pkg/acsengine/engine.go +++ b/pkg/acsengine/engine.go @@ -1146,7 +1146,6 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat }, "GetDCOSBootstrapCustomData": func() string { bootstrapProvisionScript := getDCOSBootstrapProvisionScript() - bootstrapPreprovisionExtension := "" masterIPList := generateIPList(cs.Properties.MasterProfile.Count, cs.Properties.MasterProfile.FirstConsecutiveStaticIP) for i, v := range masterIPList { masterIPList[i] = " - " + v @@ -1164,7 +1163,6 @@ func (t *TemplateGenerator) getTemplateFuncMap(cs *api.ContainerService) templat strings.Replace(bootstrapProvisionScript, "\r\n", "\n", -1), "\n", "\n\n ", -1), "MASTER_IP_LIST": strings.Join(masterIPList, "\n"), - "PREPROVISION_EXTENSION": bootstrapPreprovisionExtension, "BOOTSTRAP_IP": bootstrapIP, "BOOTSTRAP_OAUTH_ENABLED": strconv.FormatBool(cs.Properties.OrchestratorProfile.DcosConfig.BootstrapProfile.OAuthEnabled)})