salt formulas: Pin via reclass instead of salt.sh 93/47093/1
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 12 Nov 2017 01:05:50 +0000 (02:05 +0100)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Sun, 12 Nov 2017 17:16:10 +0000 (17:16 +0000)
Previous commit pinned the salt-formula-package by installing a
specific version after OPNFV-specific patches were applied by
`patch.sh`. To prevent patch bypass, move the pin to reclass model.

While at it, also move salt-formula-neutron pinning to reclass to
bypass wrong minimum length of 2 for version-pinned formula pkgs.

Change-Id: I35c2773c130d79ec919685cd771311d6c11e11a8
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit 1058c7ee35d64f38d978db2b3f840afca2facdef)

mcp/patches/patches.list
mcp/patches/patches_neutron.list [deleted file]
mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/config.yml
mcp/reclass/classes/cluster/virtual-mcp-ocata-common/infra/config.yml
mcp/scripts/salt.sh

index accdb6b..fb5a14c 100644 (file)
@@ -5,6 +5,7 @@
 # which accompanies this distribution, and is available at
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
+/usr/share/salt-formulas/env: 0001-opendaylight-formula-neutron.patch
 /usr/share/salt-formulas/env: 0002-maas-region-skip-credentials-update.patch
 /usr/share/salt-formulas/env: 0003-maas-region-force-artifact-download.patch
 /usr/share/salt-formulas/env: 0004-maas-region-use-authorized_keys-1st-entry.patch
diff --git a/mcp/patches/patches_neutron.list b/mcp/patches/patches_neutron.list
deleted file mode 100644 (file)
index e89bfe7..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 Mirantis Inc., Enea AB and others.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-/usr/share/salt-formulas/env: 0001-opendaylight-formula-neutron.patch
index e0f9a2a..2759411 100644 (file)
@@ -47,6 +47,15 @@ parameters:
     master:
       accept_policy: open_mode
       file_recv: true
+      environment:
+        prd:
+          formula:
+            maas:
+              # Temporary fixup for MaaS formula machine status int.lower()
+              version: 0.0.1+201711061044.9f1b034~xenial1
+            neutron:
+              # Temporary fixup for mismatch between formula and reclass model
+              version: 2016.12.1+201709251458.f0607d9-1xenial1
   reclass:
     storage:
       data_source:
index 3c3d526..21ed8d3 100644 (file)
@@ -43,6 +43,15 @@ parameters:
   salt:
     master:
       file_recv: true
+      environment:
+        prd:
+          formula:
+            maas:
+              # Temporary fixup for MaaS formula machine status int.lower()
+              version: 0.0.1+201711061044.9f1b034~xenial1
+            neutron:
+              # Temporary fixup for mismatch between formula and reclass model
+              version: 2016.12.1+201709251458.f0607d9-1xenial1
   reclass:
     storage:
       data_source:
index 2db992f..a03d25f 100755 (executable)
@@ -69,12 +69,4 @@ ssh ${SSH_OPTS} "${SSH_SALT}" bash -s -e << SALT_INSTALL_END
   salt -C '* and not cfg01*' pkg.upgrade refresh=False
 
   salt '*' state.sls ntp
-
-  # Temporary fixup for mismatch between neutron formula and reclass model
-  salt-call pkg.install salt-formula-neutron allow_updates=False refresh=False \
-    version=2016.12.1+201709251458.f0607d9-1xenial1
-  # Temporary fixup for MaaS formula machine status int.lower()
-  salt-call pkg.install salt-formula-maas allow_updates=False refresh=False \
-    version=0.0.1+201711061044.9f1b034~xenial1
-  cd ${OPNFV_FUEL_DIR}/mcp/patches && ./patch.sh patches_neutron.list formulas
 SALT_INSTALL_END