Public bug reported:

Hi,

When installing kubernetes cluster via magnum, there are errors in shell
script part-010 which is executed by cloudinit after boot instance.

Here is error log:

.
.
.
.
.
.
.
+ '[' -n ''
./part-010: line 54: [: missing `]'
+ sed -i '
    /^KUBE_API_ADDRESS=/ s/=.*/="--bind-address=0.0.0.0 --secure-port=6443 
--insecure-bind-address=127.0.0.1 --insecure-port=8080"/
    /^KUBE_SERVICE_ADDRESSES=/ 
s|=.*|="--service-cluster-ip-range=10.254.0.0/16"|
    /^KUBE_API_ARGS=/ s|=.*|="--runtime-config=api/all=true 
--kubelet-preferred-address-types=InternalIP,Hostname,ExternalIP  
--authorization-mode=Node,RBAC --tls-cert-file=/etc/kubernetes/certs/server.crt 
--tls-private-key-file=/etc/kubernetes/certs/server.key 
--client-ca-file=/etc/kubernetes/certs/ca.crt 
--tls-ca-file=/etc/kubernetes/certs/ca.crt 
--service-account-key-file=/etc/kubernetes/certs/service_account.key 
--kubelet-certificate-authority=/etc/kubernetes/certs/ca.crt 
--kubelet-client-certificate=/etc/kubernetes/certs/server.crt 
--kubelet-client-key=/etc/kubernetes/certs/server.key --kubelet-https=true"|
    /^KUBE_ETCD_SERVERS=/ s/=.*/="--etcd-servers=http:\/\/127.0.0.1:2379"/
    /^KUBE_ADMISSION_CONTROL=/ 
s/=.*/="--admission-control=NodeRestriction,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,DefaultTolerationSeconds,MutatingAdmissionWebhook,ValidatingAdmissionWebhook,ResourceQuota"/
' /etc/kubernetes/apiserver
+ KUBE_CONTROLLER_MANAGER_ARGS=--leader-elect=true
+ KUBE_CONTROLLER_MANAGER_ARGS='--leader-elect=true '
+ '[' -n .
./part-010: line 74: [: missing `]'
++ tr '[:upper:]' '[:lower:]'
++ echo False
+ '[' false = true ']'
.
.
.
.
.

Bad lines : 
if [ -n "$TRUST_ID" && "$(echo $CLOUD_PROVIDER_ENABLED | tr '[:upper:]' 
'[:lower:]')" == "true" ]; then
[ -n "$TRUST_ID" && "$(echo $CLOUD_PROVIDER_ENABLED | tr '[:upper:]' 
'[:lower:]')" == "true" ]; then

In header of the script is #!/bin/sh , in fedora image /bin/sh is pointing to 
/bin/bash.
Below commands should use two brackets to fix the issue.

** Affects: magnum (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1803970

Title:
  Shell ( bash ) script is invalid for kubernetes master

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/magnum/+bug/1803970/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to