Bug 1625952 - [RFE] Subnet object should have the netmask in CIDR form
Summary: [RFE] Subnet object should have the netmask in CIDR form
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning Templates
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-09-06 09:31 UTC by hprakash
Modified: 2021-12-10 17:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-09-10 05:50:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description hprakash 2018-09-06 09:31:54 UTC
1- Subnet object should have the netmask in CIDR form
2- Customer info:
Account number: #1484012

CSM customer: no

TAM customer: no

Strategic Customer: no

3- What is the nature and description of the request?
When customizing the provisioning template, hosts' subnet has the netmask value in 255.255.255.0 format. It should be available in CIDR format e.g. '/24'. In some scenarios CIDR form is accepted(e.g. nmcli command accepts the ipv4.addresses as 255.255.255.0/24).

4. Why does the customer need this? (List the business requirements here)
customer's verbatim-
"We use Satellite Provisisioning to build many physical and virtual hosts all the time. Most importantly the underlying techololgy for  Teaming-vs-Bonding interfaces is different with teaming on RHEL7.  We should be using Teaming.  To establish Team interfaces you use nmcli to establshh the NetworkManager Connection type-team object. We cant do that without the nmcli command and the current information exported from Satellite for Foreman. A potential work-aournd would be to script a map to translate subnet masks to bits - but that would be pretty ugly."

5. How would the customer like to achieve this? (List the functional requirements here)
Configure Foreman to export @host.interfaces.subnet.bits in addition to @host.interfaces.subnet.mask.

Note: Without the prefix bits from foreman it is impossible to set up NetworkManager with or without "team" interfaces.

6. For each functional requirement listed in question 5, specify how Red Hat

and the customer can test to confirm the requirement is successfully implemented.

 

7. Is there already an existing RFE upstream or in Red Hat bugzilla?

No

8. Does the customer have any specific timeline dependencies?

NA

9. Is the sales team involved in this request and do they have any additional input?

No

10. List any affected packages or components.



11. Would the customer be able to assist in testing this functionality if implemented?

Yes

Comment 1 Marek Hulan 2018-09-06 10:25:35 UTC
Sorry for my ignorance, but do I understand correctly that customer wants to have a way in provisioning templates to get the subnet netmask in CIDR notation? Looking at code, there're network and cidr macros available. Could you test if <%= @host.interfaces.subnet.network -%>/<%= @host.interfaces.subnet.cidr -%> renders what customer wants? We could potentially allow new macro "network_address" that combines both.

Comment 2 Paul Lowrie 2018-09-09 22:13:29 UTC
@host.interfaces.subnet.cidr does provide the (24) bits as required - thank you so much.

Provisioning ERB:

  <% @host.interfaces.each do |i| -%>
        <% if i.domain.to_s.match(/oob/) -%>
        nmcli con add con-name OOB \
              type ethernet \
              autoconnect yes \
              mac <%= i.mac %> \
              ifname <%= i.identifier %> \
              ipv4.method manual \
              ipv6.method ignore \
              ipv4.addresses <%= i.ip %>/<%= i.subnet.cidr -%> \
              ipv4.ignore-auto-dns yes
...

Generated output:

  vi goThanks again

Comment 3 Paul Lowrie 2018-09-09 22:15:46 UTC
Generated output:

nmcli con add con-name OOB \
              type ethernet \
              autoconnect yes \
              mac d8:d3:85:b3:c5:86 \
              ifname enp3s0f0 \
              ipv4.method manual \
              ipv6.method ignore \
              ipv4.addresses 192.168.1.51/24 \   << Here
              ipv4.ignore-auto-dns yes

Comment 4 Marek Hulan 2018-09-10 05:50:40 UTC
Thanks for letting us know, closin is not a bug. Please let me know if I misunderstood.


Note You need to log in before you can comment on or make changes to this bug.