Skip to content

Conversation

josephdrichard
Copy link
Contributor

Cherry-pick of change to allow duplicate keys in section of ptpconfig.

When initially designing PTP config parsing, there was an assumption
that for each section, all of the keys were unique. Based on this
assumption, key:value pairs for a given section were stored as a
map[string][string].

With the introduction of unicast_master_table, this assumption is no
longer true, as in the case of the UDPv4 key, there can be multiple
entries with the same key. As such, the config data structure is
changed to maintain a list of individual key:value pairs, rather than a
map of keys to values.

In addition, some restructuring was done for places that relied on the
pre-existing structure, moving most of that functionality to utility
functions in config.go

Also removes considering masterOnly 0 under [global] section when determining clock type

When initially designing PTP config parsing, there was an assumption
that for each section, all of the keys were unique.  Based on this
assumption, key:value pairs for a given section were stored as a
map[string][string].

With the introduction of unicast_master_table, this assumption is no
longer true, as in the case of the UDPv4 key, there can be multiple
entries with the same key.  As such, the config data structure is
changed to maintain a list of individual key:value pairs, rather than a
map of keys to values.

In addition, some restructuring was done for places that relied on the
pre-existing structure, moving most of that functionality to utility
functions in config.go
@openshift-ci-robot openshift-ci-robot added jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 1, 2025
@openshift-ci-robot
Copy link
Contributor

@josephdrichard: This pull request references Jira Issue OCPBUGS-59160, which is invalid:

  • expected the bug to target either version "4.18." or "openshift-4.18.", but it targets "4.19.z" instead
  • expected the bug to be in one of the following states: NEW, ASSIGNED, POST, but it is Verified instead
  • expected dependent Jira Issue OCPBUGS-55732 to target a version in 4.19.0, 4.19.z, but it targets "4.20.0" instead

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Cherry-pick of change to allow duplicate keys in section of ptpconfig.

When initially designing PTP config parsing, there was an assumption
that for each section, all of the keys were unique. Based on this
assumption, key:value pairs for a given section were stored as a
map[string][string].

With the introduction of unicast_master_table, this assumption is no
longer true, as in the case of the UDPv4 key, there can be multiple
entries with the same key. As such, the config data structure is
changed to maintain a list of individual key:value pairs, rather than a
map of keys to values.

In addition, some restructuring was done for places that relied on the
pre-existing structure, moving most of that functionality to utility
functions in config.go

Also removes considering masterOnly 0 under [global] section when determining clock type

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested review from jzding and vitus133 August 1, 2025 04:00
@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 1, 2025
@josephdrichard
Copy link
Contributor Author

/jira cherrypick OCPBUGS-59160

@openshift-ci-robot
Copy link
Contributor

@josephdrichard: Jira Issue OCPBUGS-59160 has been cloned as Jira Issue OCPBUGS-60037. Will retitle bug to link to clone.
/retitle OCPBUGS-60037: OCPBUGS-59160: Allow duplicate options in ptpconfig

In response to this:

/jira cherrypick OCPBUGS-59160

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot changed the title OCPBUGS-59160: Allow duplicate options in ptpconfig OCPBUGS-60037: OCPBUGS-59160: Allow duplicate options in ptpconfig Aug 1, 2025
@openshift-ci-robot openshift-ci-robot added jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. and removed jira/invalid-bug Indicates that a referenced Jira bug is invalid for the branch this PR is targeting. labels Aug 1, 2025
@openshift-ci-robot
Copy link
Contributor

@josephdrichard: This pull request references Jira Issue OCPBUGS-60037, which is valid. The bug has been moved to the POST state.

7 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target version (4.18.z) matches configured target version for branch (4.18.z)
  • bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)
  • release note text is set and does not match the template
  • dependent bug Jira Issue OCPBUGS-59160 is in the state Verified, which is one of the valid states (VERIFIED, RELEASE PENDING, CLOSED (ERRATA), CLOSED (CURRENT RELEASE), CLOSED (DONE), CLOSED (DONE-ERRATA))
  • dependent Jira Issue OCPBUGS-59160 targets the "4.19.z" version, which is one of the valid target versions: 4.19.0, 4.19.z
  • bug has dependents

Requesting review from QA contact:
/cc @yliu127

The bug has been updated to refer to the pull request using the external bug tracker.

In response to this:

Cherry-pick of change to allow duplicate keys in section of ptpconfig.

When initially designing PTP config parsing, there was an assumption
that for each section, all of the keys were unique. Based on this
assumption, key:value pairs for a given section were stored as a
map[string][string].

With the introduction of unicast_master_table, this assumption is no
longer true, as in the case of the UDPv4 key, there can be multiple
entries with the same key. As such, the config data structure is
changed to maintain a list of individual key:value pairs, rather than a
map of keys to values.

In addition, some restructuring was done for places that relied on the
pre-existing structure, moving most of that functionality to utility
functions in config.go

Also removes considering masterOnly 0 under [global] section when determining clock type

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci bot requested a review from yliu127 August 1, 2025 04:00
@josephdrichard josephdrichard changed the title OCPBUGS-60037: OCPBUGS-59160: Allow duplicate options in ptpconfig OCPBUGS-60037: Allow duplicate options in ptpconfig Aug 1, 2025
Copy link
Contributor

@aneeshkp aneeshkp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Aug 1, 2025
Copy link
Contributor

openshift-ci bot commented Aug 1, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aneeshkp, josephdrichard

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [aneeshkp,josephdrichard]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@josephdrichard
Copy link
Contributor Author

/retest

@aneeshkp
Copy link
Contributor

aneeshkp commented Aug 6, 2025

/label backport-risk-assessed

@openshift-ci openshift-ci bot added the backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. label Aug 6, 2025
Copy link
Contributor

openshift-ci bot commented Aug 6, 2025

@josephdrichard: all tests passed!

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot openshift-merge-bot bot merged commit e8ce938 into openshift:release-4.18 Aug 6, 2025
6 checks passed
@openshift-ci-robot
Copy link
Contributor

@josephdrichard: Jira Issue OCPBUGS-60037: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-60037 has been moved to the MODIFIED state.

In response to this:

Cherry-pick of change to allow duplicate keys in section of ptpconfig.

When initially designing PTP config parsing, there was an assumption
that for each section, all of the keys were unique. Based on this
assumption, key:value pairs for a given section were stored as a
map[string][string].

With the introduction of unicast_master_table, this assumption is no
longer true, as in the case of the UDPv4 key, there can be multiple
entries with the same key. As such, the config data structure is
changed to maintain a list of individual key:value pairs, rather than a
map of keys to values.

In addition, some restructuring was done for places that relied on the
pre-existing structure, moving most of that functionality to utility
functions in config.go

Also removes considering masterOnly 0 under [global] section when determining clock type

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@josephdrichard
Copy link
Contributor Author

/cherrypick release-4.17

@openshift-cherrypick-robot

@josephdrichard: new pull request created: #478

In response to this:

/cherrypick release-4.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-bot
Copy link
Contributor

[ART PR BUILD NOTIFIER]

Distgit: linuxptp-daemon
This PR has been included in build ose-linuxptp-daemon-container-v4.18.0-202508062303.p0.ge8ce938.assembly.stream.el9.
All builds following this will include this PR.

aneeshkp pushed a commit to aneeshkp/linuxptp-daemon that referenced this pull request Aug 21, 2025
…duplicate_418

OCPBUGS-60037: Allow duplicate options in ptpconfig
Signed-off-by: Aneesh Puttur <aputtur@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. backport-risk-assessed Indicates a PR to a release branch has been evaluated and considered safe to accept. jira/severity-important Referenced Jira bug's severity is important for the branch this PR is targeting. jira/valid-bug Indicates that a referenced Jira bug is valid for the branch this PR is targeting. jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.