From 5522312f47e96a3cacb56c4ad7b872d6148dd568 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Sep 2019 15:39:35 +0200 Subject: [PATCH] Allow Cloud8 with SP4 (SOC-10478) --- .../crowbar/template-provisioner.json | 22 ++++ crowbar_framework/config/repos-cloud.yml | 102 +++++++++--------- crowbar_framework/lib/crowbar/platform.rb | 3 + .../api/upgrade_controller_spec.rb | 4 +- .../spec/models/api/node_spec.rb | 20 ++-- .../spec/models/api/upgrade_spec.rb | 4 +- 6 files changed, 90 insertions(+), 65 deletions(-) diff --git a/chef/data_bags/crowbar/template-provisioner.json b/chef/data_bags/crowbar/template-provisioner.json index 8829f01965..fa04d93b2d 100644 --- a/chef/data_bags/crowbar/template-provisioner.json +++ b/chef/data_bags/crowbar/template-provisioner.json @@ -140,6 +140,28 @@ "append": " " } }, + "suse-12.4": { + "aarch64": { + "initrd": "boot/aarch64/initrd", + "kernel": "boot/aarch64/linux", + "append": " " + }, + "x86_64": { + "initrd": "boot/x86_64/loader/initrd", + "kernel": "boot/x86_64/loader/linux", + "append": " " + }, + "ppc64le": { + "initrd": "boot/ppc64le/initrd", + "kernel": "boot/ppc64le/linux", + "append": " " + }, + "s390x": { + "initrd": "boot/s390x/initrd", + "kernel": "boot/s390x/linux", + "append": " " + } + }, "opensuse-42.1": { "x86_64": { "initrd": "boot/x86_64/loader/initrd", diff --git a/crowbar_framework/config/repos-cloud.yml b/crowbar_framework/config/repos-cloud.yml index 371f3cd864..6da09d2e8b 100644 --- a/crowbar_framework/config/repos-cloud.yml +++ b/crowbar_framework/config/repos-cloud.yml @@ -1,23 +1,23 @@ --- -suse-12.3: +suse-12.4: aarch64: - sles12-sp3-pool: - name: "SLES12-SP3-Pool" + sles12-sp4-pool: + name: "SLES12-SP4-Pool" required: "mandatory" features: ["os"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/SLES/12.3/POOL/aarch64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/SLES/12.4/POOL/aarch64" url: - smt_path: "SUSE/Products/SLE-SERVER/12-SP3/aarch64/product" + smt_path: "SUSE/Products/SLE-SERVER/12-SP4/aarch64/product" ask_on_error: false - sles12-sp3-updates: - name: "SLES12-SP3-Updates" + sles12-sp4-updates: + name: "SLES12-SP4-Updates" required: "mandatory" features: ["os"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP3:aarch64/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP4:aarch64/update" url: - smt_path: "SUSE/Updates/SLE-SERVER/12-SP3/aarch64/update" + smt_path: "SUSE/Updates/SLE-SERVER/12-SP4/aarch64/update" ask_on_error: false cloud: name: "Cloud" @@ -50,32 +50,32 @@ suse-12.3: url: smt_path: "SUSE/Updates/OpenStack-Cloud-Crowbar/8/aarch64/update" ask_on_error: false - sle12-sp3-ha-pool: - name: "SLE12-SP3-HA-Pool" + sle12-sp4-ha-pool: + name: "SLE12-SP4-HA-Pool" required: "optional" features: ["ha"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/sle-ha/12.3/POOL/aarch64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/sle-ha/12.4/POOL/aarch64" fingerprint: "" url: - smt_path: "SUSE/Products/SLE-HA/12-SP3/aarch64/product" + smt_path: "SUSE/Products/SLE-HA/12-SP4/aarch64/product" ask_on_error: false - sle12-sp3-ha-updates: - name: "SLE12-SP3-HA-Updates" + sle12-sp4-ha-updates: + name: "SLE12-SP4-HA-Updates" required: "optional" features: ["ha"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP3:aarch64/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP4:aarch64/update" fingerprint: "" url: - smt_path: "SUSE/Updates/SLE-HA/12-SP3/aarch64/update" + smt_path: "SUSE/Updates/SLE-HA/12-SP4/aarch64/update" ask_on_error: false suse-enterprise-storage-5-pool: name: "SUSE-Enterprise-Storage-5-Pool" required: "optional" features: ["ceph"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:Update:Products:SES5/ses/5/POOL/aarch64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:Update:Products:SES5/ses/5/POOL/aarch64" fingerprint: "FEAB 5025 39D8 46DB 2C09 61CA 70AF 9E81 39DB 7C82" url: smt_path: "SUSE/Products/Storage/5/aarch64/product" @@ -96,25 +96,25 @@ suse-12.3: url: ask_on_error: false x86_64: - sles12-sp3-pool: - name: "SLES12-SP3-Pool" + sles12-sp4-pool: + name: "SLES12-SP4-Pool" required: "mandatory" features: ["os"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/SLES/12.3/POOL/x86_64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/SLES/12.4/POOL/x86_64" fingerprint: "" url: - smt_path: "SUSE/Products/SLE-SERVER/12-SP3/x86_64/product" + smt_path: "SUSE/Products/SLE-SERVER/12-SP4/x86_64/product" ask_on_error: false - sles12-sp3-updates: - name: "SLES12-SP3-Updates" + sles12-sp4-updates: + name: "SLES12-SP4-Updates" required: "mandatory" features: ["os"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP3:x86_64/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP4:x86_64/update" fingerprint: "" url: - smt_path: "SUSE/Updates/SLE-SERVER/12-SP3/x86_64/update" + smt_path: "SUSE/Updates/SLE-SERVER/12-SP4/x86_64/update" ask_on_error: false cloud: name: "Cloud" @@ -147,32 +147,32 @@ suse-12.3: url: smt_path: "SUSE/Updates/OpenStack-Cloud-Crowbar/8/x86_64/update" ask_on_error: false - sle12-sp3-ha-pool: - name: "SLE12-SP3-HA-Pool" + sle12-sp4-ha-pool: + name: "SLE12-SP4-HA-Pool" required: "optional" features: ["ha"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/sle-ha/12.3/POOL/x86_64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/sle-ha/12.4/POOL/x86_64" fingerprint: "" url: - smt_path: "SUSE/Products/SLE-HA/12-SP3/x86_64/product" + smt_path: "SUSE/Products/SLE-HA/12-SP4/x86_64/product" ask_on_error: false - sle12-sp3-ha-updates: - name: "SLE12-SP3-HA-Updates" + sle12-sp4-ha-updates: + name: "SLE12-SP4-HA-Updates" required: "optional" features: ["ha"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP3:x86_64/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP4:x86_64/update" fingerprint: "" url: - smt_path: "SUSE/Updates/SLE-HA/12-SP3/x86_64/update" + smt_path: "SUSE/Updates/SLE-HA/12-SP4/x86_64/update" ask_on_error: false suse-enterprise-storage-5-pool: name: "SUSE-Enterprise-Storage-5-Pool" required: "optional" features: ["ceph"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:Update:Products:SES5/ses/5/POOL/x86_64" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:Update:Products:SES5/ses/5/POOL/x86_64" fingerprint: "FEAB 5025 39D8 46DB 2C09 61CA 70AF 9E81 39DB 7C82" url: smt_path: "SUSE/Products/Storage/5/x86_64/product" @@ -192,25 +192,25 @@ suse-12.3: url: ask_on_error: false s390x: - sles12-sp3-pool: - name: "SLES12-SP3-Pool" + sles12-sp4-pool: + name: "SLES12-SP4-Pool" required: "optional" features: ["os"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/SLES/12.3/POOL/s390x" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/SLES/12.4/POOL/s390x" fingerprint: "" url: - smt_path: "SUSE/Products/SLE-SERVER/12-SP3/s390x/product" + smt_path: "SUSE/Products/SLE-SERVER/12-SP4/s390x/product" ask_on_error: false - sles12-sp3-updates: - name: "SLES12-SP3-Updates" + sles12-sp4-updates: + name: "SLES12-SP4-Updates" required: "optional" features: ["os"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP3:s390x/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-SERVER:12-SP4:s390x/update" fingerprint: "" url: - smt_path: "SUSE/Updates/SLE-SERVER/12-SP3/s390x/update" + smt_path: "SUSE/Updates/SLE-SERVER/12-SP4/s390x/update" ask_on_error: false cloud: name: "Cloud" @@ -248,23 +248,23 @@ suse-12.3: url: smt_path: "SUSE/Updates/OpenStack-Cloud-Crowbar/8/s390x/update" ask_on_error: false - sle12-sp3-ha-pool: - name: "SLE12-SP3-HA-Pool" + sle12-sp4-ha-pool: + name: "SLE12-SP4-HA-Pool" required: "optional" features: ["ha"] repomd: - tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP3:GA/sle-ha/12.3/POOL/s390x" + tag: "obsproduct://build.suse.de/SUSE:SLE-12-SP4:GA/sle-ha/12.4/POOL/s390x" fingerprint: "" url: - smt_path: "SUSE/Products/SLE-HA/12-SP3/s390x/product" + smt_path: "SUSE/Products/SLE-HA/12-SP4/s390x/product" ask_on_error: false - sle12-sp3-ha-updates: - name: "SLE12-SP3-HA-Updates" + sle12-sp4-ha-updates: + name: "SLE12-SP4-HA-Updates" required: "optional" features: ["ha"] repomd: - tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP3:s390x/update" + tag: "obsrepository://build.suse.de/SUSE:Updates:SLE-HA:12-SP4:s390x/update" fingerprint: "" url: - smt_path: "SUSE/Updates/SLE-HA/12-SP3/s390x/update" + smt_path: "SUSE/Updates/SLE-HA/12-SP4/s390x/update" ask_on_error: false diff --git a/crowbar_framework/lib/crowbar/platform.rb b/crowbar_framework/lib/crowbar/platform.rb index 5e81cf249c..511bfe3a40 100644 --- a/crowbar_framework/lib/crowbar/platform.rb +++ b/crowbar_framework/lib/crowbar/platform.rb @@ -19,6 +19,7 @@ class Platform class << self def pretty_target_platform(target_platform) return "openSUSE Leap 42.1" if target_platform == "opensuse-42.1" + return "SLES 12 SP4" if target_platform == "suse-12.4" return "SLES 12 SP3" if target_platform == "suse-12.3" return "SLES 12 SP2" if target_platform == "suse-12.2" return "SLES 12 SP1" if target_platform == "suse-12.1" @@ -46,6 +47,7 @@ def require_license_platforms def support_software_raid [ "opensuse-42.1", + "suse-12.4", "suse-12.3", "suse-12.2", "suse-12.1", @@ -58,6 +60,7 @@ def support_software_raid def support_default_fs [ "opensuse-42.1", + "suse-12.4", "suse-12.3", "suse-12.2", "suse-12.1", diff --git a/crowbar_framework/spec/controllers/api/upgrade_controller_spec.rb b/crowbar_framework/spec/controllers/api/upgrade_controller_spec.rb index d51cb45b10..8b425bd595 100644 --- a/crowbar_framework/spec/controllers/api/upgrade_controller_spec.rb +++ b/crowbar_framework/spec/controllers/api/upgrade_controller_spec.rb @@ -194,7 +194,7 @@ receive(:all).and_return([Node.find_by_name("testing.crowbar.com")]) ) allow(Api::Upgrade).to( - receive(:target_platform).and_return("suse-12.3") + receive(:target_platform).and_return("suse-12.4") ) allow(Api::Node).to( receive(:node_architectures).and_return( @@ -210,7 +210,7 @@ ["os", "ceph", "ha", "openstack"].each do |feature| allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - feature, "suse-12.3", "x86_64" + feature, "suse-12.4", "x86_64" ).and_return([true, {}]) ) end diff --git a/crowbar_framework/spec/models/api/node_spec.rb b/crowbar_framework/spec/models/api/node_spec.rb index 2456a459da..7a8743d355 100644 --- a/crowbar_framework/spec/models/api/node_spec.rb +++ b/crowbar_framework/spec/models/api/node_spec.rb @@ -18,21 +18,21 @@ let!(:os_repo_missing) do allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - "os", "suse-12.3", "x86_64" + "os", "suse-12.4", "x86_64" ).and_return( [ false, { "missing" => { "x86_64" => [ - "SLES12-SP3-Pool", - "SLES12-SP3-Updates" + "SLES12-SP4-Pool", + "SLES12-SP4-Updates" ] }, "inactive" => { "x86_64" => [ - "SLES12-SP3-Pool", - "SLES12-SP3-Updates" + "SLES12-SP4-Pool", + "SLES12-SP4-Updates" ] } } @@ -43,7 +43,7 @@ let!(:openstack_repo_missing) do allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - "openstack", "suse-12.3", "x86_64" + "openstack", "suse-12.4", "x86_64" ).and_return( [ false, @@ -70,7 +70,7 @@ before(:each) do allow(Api::Upgrade).to( - receive(:target_platform).and_return("suse-12.3") + receive(:target_platform).and_return("suse-12.4") ) allow(Api::Node).to( receive(:node_architectures).and_return( @@ -89,7 +89,7 @@ it "finds the os repositories required to upgrade the nodes" do allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - "os", "suse-12.3", "x86_64" + "os", "suse-12.4", "x86_64" ).and_return([true, {}]) ) allow_any_instance_of(ProvisionerService).to receive(:enable_repository).and_return(true) @@ -108,7 +108,7 @@ ["os", "ceph", "ha", "openstack"].each do |feature| allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - feature, "suse-12.3", "x86_64" + feature, "suse-12.4", "x86_64" ).and_return([true, {}]) ) @@ -141,7 +141,7 @@ it "finds any node with the ceph addon deployed" do allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - "ceph", "suse-12.3", "x86_64" + "ceph", "suse-12.4", "x86_64" ).and_return([true, {}]) ) allow_any_instance_of(ProvisionerService).to receive(:enable_repository).and_return(true) diff --git a/crowbar_framework/spec/models/api/upgrade_spec.rb b/crowbar_framework/spec/models/api/upgrade_spec.rb index a0419c2db0..64b37ba0b1 100644 --- a/crowbar_framework/spec/models/api/upgrade_spec.rb +++ b/crowbar_framework/spec/models/api/upgrade_spec.rb @@ -73,7 +73,7 @@ receive(:all).and_return([Node.find_by_name("testing.crowbar.com")]) ) allow(Api::Upgrade).to( - receive(:target_platform).and_return("suse-12.3") + receive(:target_platform).and_return("suse-12.4") ) allow(::Crowbar::Repository).to( receive(:provided_and_enabled?).and_return(true) @@ -81,7 +81,7 @@ ["os", "ceph", "ha", "openstack"].each do |feature| allow(::Crowbar::Repository).to( receive(:provided_and_enabled_with_repolist).with( - feature, "suse-12.3", "x86_64" + feature, "suse-12.4", "x86_64" ).and_return([true, {}]) ) end