Bug 2013273 - Nil pointer exception when phc2sys options are missing
Summary: Nil pointer exception when phc2sys options are missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.10
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.10.0
Assignee: Aneesh Puttur
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks: 2013690
TreeView+ depends on / blocked
 
Reported: 2021-10-12 13:40 UTC by Aneesh Puttur
Modified: 2022-07-27 02:24 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-10 16:18:42 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift linuxptp-daemon pull 55 0 None Merged Bug 2013273:Fix nil pointer exception when phc2sys options are missing 2021-10-13 14:30:44 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-10 16:19:09 UTC

Description Aneesh Puttur 2021-10-12 13:40:16 UTC
Description of problem:

ptp config without phc2sys options  attribute will thrown nil pointer exception 

Version-Release number of selected component (if applicable):openshift 4.9


How reproducible:
Apply ptp config without phc2sysOpts

###
apiVersion: ptp.openshift.io/v1
kind: PtpConfig
metadata:
  name: ptp-config-bm-worker
  namespace: openshift-ptp 
spec:
  profile: 
  - name: "profile1" 
    ptp4lOpts: "-2  --summary_interval -4" 
    ptp4lConf: |
      [ens5f1]
      masterOnly 0
###

Comment 3 or marziano 2022-01-06 13:04:10 UTC
Server Version: 4.10.0-0.nightly-2021-12-21-130047
PTP Version: ptp-operator.4.10.0-202112230034-6589cc888f

PTP config:
-----------
apiVersion: ptp.openshift.io/v1
kind: PtpConfig
metadata:
  name: ptp-configs-five
  namespace: openshift-ptp
spec:
  profile:
    - name: master
      interface: ens5f1
      ptp4lOpts: -2 --summary_interval -4
  recommend:
    - match:
        - nodeLabel: ptp/master
      priority: 10
      profile: master

Comment 6 hhassid 2022-02-03 15:18:28 UTC
Bug has been validated!

cluster version: 4.10.0-rc.2
PTP version:     ptp-operator.4.10.0-202201261535

PTP config:
~~~~~~~~~~
apiVersion: ptp.openshift.io/v1
kind: PtpConfig
metadata:
  name: ptp-configs-five
  namespace: openshift-ptp
spec:
  profile:
    - name: master
      interface: ens1f0
      ptp4lOpts: -2 --summary_interval -4
  recommend:
    - match:
        - nodeLabel: ptp/grandmaster
      priority: 10
      profile: master

~~~~~~~~~~
NAME               AGE
ptp-configs-five   4m11s

Name:         ptp-configs-five
Namespace:    openshift-ptp
Labels:       <none>
Annotations:  <none>
API Version:  ptp.openshift.io/v1
Kind:         PtpConfig
Metadata:
  Creation Timestamp:  2022-02-01T13:07:17Z
  Generation:          1
  Managed Fields:
    API Version:  ptp.openshift.io/v1
    Fields Type:  FieldsV1
    fieldsV1:
      f:metadata:
        f:annotations:
          .:
          f:kubectl.kubernetes.io/last-applied-configuration:
      f:spec:
        .:
        f:profile:
        f:recommend:
    Manager:         kubectl-client-side-apply
    Operation:       Update
    Time:            2022-02-01T13:07:17Z
  Resource Version:  3451099
  UID:               e69a49f3-e735-4891-b085-4412cff67d39
Spec:
  Profile:
    Interface:  ens1f0
    Name:       master
    ptp4lOpts:  -2 --summary_interval -4
  Recommend:
    Match:
      Node Label:  ptp/grandmaster
    Priority:      10
    Profile:       master
Events:            <none>

ptp4l[436633.814]: [ptp4l.0.config] selected local clock 0c42a1.fffe.bcf468 as best master
ptp4l[436633.814]: [ptp4l.0.config] assuming the grand master role

Comment 8 errata-xmlrpc 2022-03-10 16:18:42 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 (Moderate: OpenShift Container Platform 4.10.3 security 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/RHSA-2022:0056


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