RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2062719 - RFE: Nmstate should accept integer and string digit values in integer properties
Summary: RFE: Nmstate should accept integer and string digit values in integer properties
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: nmstate
Version: 9.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Gris Ge
QA Contact: Mingyu Shi
URL:
Whiteboard:
: 2048045 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-10 12:15 UTC by Fernando F. Mancera
Modified: 2023-01-09 09:33 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-11-15 10:00:44 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github nmstate nmstate pull 1838 0 None open rust: Support string for integer and boolean 2022-04-01 10:20:15 UTC
Red Hat Issue Tracker RHELPLAN-115198 0 None None None 2022-03-10 12:26:08 UTC
Red Hat Product Errata RHBA-2022:7991 0 None None None 2022-11-15 10:00:56 UTC

Description Fernando F. Mancera 2022-03-10 12:15:53 UTC
Description of problem:

Nmstate should accept digit-only string values in integer properties.

User story:

As a Linux system administrator I want to be able to specify digit-only string in integer properties so I can use nmstate from Ansible.

Acceptance criteria:

- Given a Linux system using Nmstate to handle network configuration
- When the user applies a state with a string representation of any property
- Then Nmstate will configure the state as if the property was specified in its native format

Comment 2 Till Maas 2022-03-11 13:08:36 UTC
This is required for all scalar values (effectively probably numbers and booleans), so I updated the summary and acceptance criteria.

Comment 4 Fernando F. Mancera 2022-04-05 14:51:58 UTC
Merged and tested manually. In addition, the CI is full green.

Comment 8 Fernando F. Mancera 2022-04-08 07:37:01 UTC
*** Bug 2048045 has been marked as a duplicate of this bug. ***

Comment 9 Mingyu Shi 2022-04-25 04:51:51 UTC
Waiting for the next all-rust build to do the test, to avoid reworking.

Comment 10 Mingyu Shi 2022-06-01 06:13:09 UTC
Verified with versions:
nmstate-2.1.1-0.alpha.20220519.437e4a9.el9.x86_64
NetworkManager-1.39.5-1.el9.x86_64
Linux hp-dl388g8-08.rhts.eng.pek2.redhat.com 5.14.0-101.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 27 07:57:32 EDT 2022 x86_64 x86_64 x86_64 GNU/Linux
DISTRO=RHEL-9.1.0-20220531.0

# cat eno4.yaml 
interfaces:
  - name: eno4
    type: ethernet
    state: up
    mac-address: "D8:9D:67:15:89:43"
    mtu: "1500"
    ipv4:
      enabled: false
    ipv6:
      enabled: "1"
      dhcp: 1
# nmstatectl set eno4.yaml 
Using 'set' is deprecated, use 'apply' instead.
---
dns-resolver: {}
route-rules: {}
routes: {}
interfaces:
  - name: eno4
    type: ethernet
    state: up
    mac-address: "D8:9D:67:15:89:43"
    mtu: 1500
    ipv4:
      enabled: false
    ipv6:
      enabled: true
      dhcp: true
ovs-db: {}

# nmstatectl show eno4
---
dns-resolver: {}
route-rules: {}
routes: {}
interfaces:
  - name: eno4
    type: ethernet
    state: up
    mac-address: "D8:9D:67:15:89:43"
    mtu: 1500
    ipv4:
      enabled: false
    ipv6:
      enabled: true
      dhcp: true
      autoconf: false
      address:
        - ip: "fe80::da9d:67ff:fe15:8943"
          prefix-length: 64
      auto-dns: true
      auto-gateway: true
      auto-routes: true
      auto-route-table-id: 0
    accept-all-mac-addresses: false
    lldp:
      enabled: false
    ethtool:
      pause:
        rx: true
        tx: true
        autoneg: true
      feature:
        tx-tcp-mangleid-segmentation: false
        rx-checksum: true
        tx-tcp-segmentation: true
        rx-gro: true
        tx-checksum-ipv4: true
        tx-tcp-ecn-segmentation: true
        tx-checksum-ipv6: true
        tx-generic-segmentation: true
        rx-gro-list: false
        tx-tcp6-segmentation: true
        highdma: true
        tx-nocache-copy: false
        rx-udp-gro-forwarding: false
      coalesce:
        rx-frames: 5
        rx-usecs: 20
        rx-usecs-irq: 0
        stats-block-usecs: 0
        tx-frames: 53
        tx-frames-irq: 5
        tx-usecs: 72
        tx-usecs-irq: 0
      ring:
        rx: 200
        rx-max: 2047
        tx: 511
        tx-max: 511
    ethernet:
      auto-negotiation: true
      speed: 1000
      duplex: full

Comment 12 errata-xmlrpc 2022-11-15 10:00:44 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 (nmstate bug fix and enhancement update), 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-2022:7991


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