stx-puppet: add re-tries to workaround docker login failure 11/5111/1
authorJackie Huang <jackie.huang@windriver.com>
Wed, 18 Nov 2020 01:49:54 +0000 (09:49 +0800)
committerJackie Huang <jackie.huang@windriver.com>
Wed, 18 Nov 2020 12:35:09 +0000 (20:35 +0800)
Add re-tries to workaround the follwoing docker login failure:
Error: docker login registry.local:9001 -u admin -p St8rlingX* returned 1 instead of one of [0]
Error: /Stage[main]/Platform::Kubernetes::Master::Init/Exec[login local
       registry]/returns: change from notrun to 0 failed: docker login
       registry.local:9001 -u admin -p St8rlingX* returned 1 instead of one of [0]

Issue-ID: INF-204
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Change-Id: I7087b8b5e27baa617bebbada0a09953299829432

meta-stx/recipes-support/puppet/files/stx-puppet/0011-puppet-manifest-kubernetes.pp-add-re-tries-for-docker-login.patch [new file with mode: 0644]
meta-stx/recipes-support/puppet/stx-puppet_git.bb

diff --git a/meta-stx/recipes-support/puppet/files/stx-puppet/0011-puppet-manifest-kubernetes.pp-add-re-tries-for-docker-login.patch b/meta-stx/recipes-support/puppet/files/stx-puppet/0011-puppet-manifest-kubernetes.pp-add-re-tries-for-docker-login.patch
new file mode 100644 (file)
index 0000000..611ba73
--- /dev/null
@@ -0,0 +1,28 @@
+From 911ce04cdb47f110e8f9bd8be79ab69fcf13b107 Mon Sep 17 00:00:00 2001
+From: Jackie Huang <jackie.huang@windriver.com>
+Date: Wed, 18 Nov 2020 09:45:54 +0800
+Subject: [PATCH] kubernetes.pp: add re-tries for docker login
+
+Upstream-Status: Inappropriate [workaround]
+
+Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
+---
+ puppet-manifests/src/modules/platform/manifests/kubernetes.pp | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp
+index 3fa1c8a..393ea6b 100644
+--- a/puppet-manifests/src/modules/platform/manifests/kubernetes.pp
++++ b/puppet-manifests/src/modules/platform/manifests/kubernetes.pp
+@@ -269,6 +269,8 @@ class platform::kubernetes::master::init
+     -> exec { 'login local registry':
+       command   => "docker login registry.local:9001 -u ${::platform::dockerdistribution::params::registry_username} -p ${::platform::dockerdistribution::params::registry_password}", # lint:ignore:140chars
+       logoutput => true,
++      tries     => 3,
++      try_sleep => 1,
+     }
+     -> exec { 'kubeadm to pre pull images':
+-- 
+2.7.4
+
index e58d2dd..840cce1 100644 (file)
@@ -52,6 +52,7 @@ SRC_URI = " \
        file://${BPN}/0008-puppet-manifests-keystone-include-platform-client.patch \
        file://${BPN}/0009-puppet-manifests-lvm-remove-lvmetad.patch \
        file://${BPN}/0010-puppet-manifest-apply-workaround-to-ignore-known-err.patch \
+       file://${BPN}/0011-puppet-manifest-kubernetes.pp-add-re-tries-for-docker-login.patch \
        file://${BPN}/get-boot-device-from-cmdline.patch \
        file://${BPN}/poky-specific-apply-network-config-script.patch \
        file://${BPN}/apply_network_config_poky.sh \