Bug 1406506

Summary: Network snippets missing from atomic kickstart
Product: Red Hat Satellite Reporter: Partha Aji <paji>
Component: AtomicAssignee: Partha Aji <paji>
Status: CLOSED ERRATA QA Contact: Peter Ondrejka <pondrejk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.2.6CC: bkearney, cwelton, ehelms, mmccune, pm-sat, stbenjam, szadok, tomckay, zhunting
Target Milestone: UnspecifiedKeywords: PrioBumpField, Reopened, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/17924
Whiteboard:
Fixed In Version: rubygem-foreman_theme_satellite-0.1.41-1,rubygem-katello-3.0.0.97-1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1417076 (view as bug list) Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1417076    

Description Partha Aji 2016-12-20 18:08:03 UTC
The Satellite Atomic Kickstart does not include "network snippets" causing provisioned atomic hosts to not have the correct network information

There is no network section in https://github.com/Katello/katello/blob/master/app/views/foreman/unattended/kickstart-katello-atomic.erb similar to 
https://github.com/Katello/katello/blob/master/app/views/foreman/unattended/kickstart-katello.erb#L31-L38

Steps to Verify

1) Provision an atomic host (using dhcp)
2) Login to the provisioned host 
3) cat "/etc/sysconfig/network-scripts/if-eth0"
You should be able to see the dhcp host name
4) Go to the hosts page of this host and check out the provisioning template . Make sure a section like the following exists
"network --bootproto dhcp --hostname toledo --device=00:1a:4a:3e:a6:14"

Comment 1 Partha Aji 2016-12-20 18:14:26 UTC
Temporary work around ->
1) Clone the "Satellite Atomic Kickstart Default" template
2) Add the following patch to the template

"""
@@ -7,6 +7,15 @@ lang <%= @host.params['lang'] || 'en_US.UTF-8' %>
 keyboard <%= @host.params['keyboard'] || 'us' %>
 timezone --utc <%= @host.params['time-zone'] || 'UTC' %>

+<% subnet = @host.subnet -%>
+<% if subnet.respond_to?(:dhcp_boot_mode?) -%>
+<% dhcp = subnet.dhcp_boot_mode? && !@static -%>
+<% else -%>
+<% dhcp = !@static -%>
+<% end -%>
+
+network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{[subnet.dns_primary, subnet.dns_secondary].select(&:present?).join(',')}" %> --hostname <%= @host %><%= " --device=#{@host.mac}" -%>
+
 # Partition table should create /boot and a volume atomicos
 <% if @dynamic -%>
 %include /tmp/diskpart.cfg
--
1.8.3.1
"""

Comment 2 Partha Aji 2016-12-20 18:18:24 UTC
Completing the previous comment

3) Associate the new template to "Red Hat Enterprise Linux Atomic Host 7" and "Red Hat Enterprise Linux Atomic Host 7.3"

4) Update your host groups/hosts to use the new template.

Once this issue is resolved you should be able to revert back to the original template.

Comment 5 Shlomi Zadok 2017-01-04 14:29:53 UTC
Created redmine issue http://projects.theforeman.org/issues/17924 from this bug

Comment 6 Satellite Program 2017-01-04 17:07:26 UTC
Upstream bug assigned to szadok

Comment 7 Satellite Program 2017-01-04 17:07:30 UTC
Upstream bug assigned to szadok

Comment 8 Satellite Program 2017-01-10 21:07:32 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/17924 has been resolved.

Comment 9 Peter Ondrejka 2017-02-16 10:31:55 UTC
Verified in Satellite 6.2.8 snap 2, the snippet has been added to the Satellite Atomic Kickstart template, and the network is configured on the provisioned atomic host:

# ip a
...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 52:54:00:2a:62:8b brd ff:ff:ff:ff:ff:ff
    inet 192.168.100.39/24 brd 192.168.100.255 scope global dynamic eth0
       valid_lft 42545sec preferred_lft 42545sec
    inet6 fe80::5054:ff:fe2a:628b/64 scope link

Comment 11 errata-xmlrpc 2017-03-06 08:36:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0447

Comment 13 Satellite Program 2017-07-26 14:08:22 UTC
Upstream bug assigned to paji

Comment 14 Satellite Program 2017-07-26 14:08:27 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18054 has been resolved.

Comment 15 Satellite Program 2017-07-26 16:08:16 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18054 has been resolved.

Comment 16 Peter Ondrejka 2017-10-24 15:25:09 UTC
*** Bug 1417076 has been marked as a duplicate of this bug. ***

Comment 17 Peter Ondrejka 2017-10-24 15:37:15 UTC
Verified in satellite-6.3.0-21.0.beta.el7sat.noarch, the network snippet has been added to the Satellite Atomic Kickstart template

Comment 18 Satellite Program 2018-02-21 16:54:37 UTC
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA.
> > 
> > For information on the advisory, and where to find the updated files, follow the link below.
> > 
> > If the solution does not work for you, open a new bug report.
> > 
> > https://access.redhat.com/errata/RHSA-2018:0336

Comment 19 Red Hat Bugzilla 2023-09-14 03:36:32 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days