From 53db1123caa4bc81e0a2289cac726a231f346299 Mon Sep 17 00:00:00 2001 From: Diego Tapia <64498901+dtapia-IT@users.noreply.github.com> Date: Tue, 17 Dec 2024 22:58:27 -0300 Subject: [PATCH] (node/auxtel-dc01.cp) add EL9 network configuration & tests --- hieradata/node/auxtel-dc01.cp.lsst.org.yaml | 56 +++++++++---------- .../nodes/auxtel-dc01.cp.lsst.org_spec.rb | 30 ++++++++-- 2 files changed, 52 insertions(+), 34 deletions(-) diff --git a/hieradata/node/auxtel-dc01.cp.lsst.org.yaml b/hieradata/node/auxtel-dc01.cp.lsst.org.yaml index e0d70bbd57..1610646ecb 100644 --- a/hieradata/node/auxtel-dc01.cp.lsst.org.yaml +++ b/hieradata/node/auxtel-dc01.cp.lsst.org.yaml @@ -1,34 +1,32 @@ --- -network::interfaces_hash: - em1: # dds - bootproto: "dhcp" - defroute: "no" - nozeroconf: "yes" - onboot: "yes" - type: "Ethernet" - em2: # fqdn *and* ccs-auxtel - bootproto: "dhcp" - defroute: "yes" - nozeroconf: "yes" - onboot: "yes" - type: "Ethernet" - em3: # not connected - bootproto: "none" - onboot: "no" - type: "Ethernet" - em4: # not connected - bootproto: "none" - onboot: "no" - type: "Ethernet" +nm::connections: + eno1: # fqdn + content: + connection: + id: "eno1" + uuid: "354bf22a-2048-4ac3-8c70-b161fe052d00" + type: "ethernet" + interface-name: "eno1" + ethernet: {} + ipv4: + method: "auto" + ipv6: + method: "disabled" + proxy: {} -network::mroutes_hash: - em1: - routes: - "139.229.147.0/24": "139.229.170.254" - "139.229.166.0/24": "139.229.170.254" - "139.229.167.0/24": "139.229.170.254" - #"139.229.170.0/24": "139.229.170.254" - "139.229.178.0/24": "139.229.170.254" + eno2: + content: + connection: + id: "eno2" + uuid: "116172cd-60a2-4ce4-b125-47028a79e0da" + type: "ethernet" + autoconnect: "false" + interface-name: "eno2" + ethernet: {} + ipv4: + method: "disabled" + ipv6: + method: "disabled" nfs::client_enabled: true diff --git a/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb b/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb index 0a48147e0b..fd5f853e7d 100644 --- a/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb +++ b/spec/hosts/nodes/auxtel-dc01.cp.lsst.org_spec.rb @@ -27,6 +27,28 @@ it { is_expected.to compile.with_all_deps } + include_examples 'baremetal' + include_context 'with nm interface' + it { is_expected.to have_nm__connection_resource_count(2) } + + %w[ + eno2 + ].each do |i| + context "with #{i}" do + let(:interface) { i } + + it_behaves_like 'nm disabled interface' + end + end + + context 'with eno1' do + let(:interface) { 'eno1' } + + it_behaves_like 'nm enabled interface' + it_behaves_like 'nm dhcp interface' + it_behaves_like 'nm ethernet interface' + end + it do is_expected.to contain_s3daemon__instance('cp-latiss').with( s3_endpoint_url: 'https://s3.cp.lsst.org', @@ -43,8 +65,6 @@ ) end - include_examples 'baremetal' - it do is_expected.to contain_nfs__client__mount('/data').with( share: 'data', @@ -60,6 +80,6 @@ atboot: true ) end - end # on os - end # on_supported_os -end # role + end + end # on os +end # on_supported_os