Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-33894

Avoid dumping Go struct in potentially user-facing reason annotation

XMLWordPrintable

    • Moderate
    • No
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      Related to OCPBUGS-33891, sometimes degraded nodes are accompanied by a message like this:

      failed to set annotations on node: unable to update node "&Node{ObjectMeta:{      0 0001-01-01 00:00:00 +00
      00 UTC <nil> <nil> map[] map[] [] [] []},Spec:NodeSpec{PodCIDR:,DoNotUseExternalID:,ProviderID:,Unschedulable:false,Taints:[]Taint{},ConfigSource:nil,PodCIDRs:[],},Status:NodeStatus{Capacit
      y:ResourceList{},Allocatable:ResourceList{},Phase:,Conditions:[]NodeCondition{},Addresses:[]NodeAddress{},DaemonEndpoints:NodeDaemonEndpoints{KubeletEndpoint:DaemonEndpoint{Port:0,},},NodeI
      nfo:NodeSystemInfo{MachineID:,SystemUUID:,BootID:,KernelVersion:,OSImage:,ContainerRuntimeVersion:,KubeletVersion:,KubeProxyVersion:,OperatingSystem:,Architecture:,},Images:[]ContainerImage
      {},VolumesInUse:[],VolumesAttached:[]AttachedVolume{},Config:nil,},}": Patch "https://api-int.evakhoni-1215.qe.devcluster.openshift.com:6443/api/v1/nodes/<node>": read tcp 10.0.26.198:41196
      ->10.0.15.142:6443: read: connection reset by peer
      

      The reason annotation is potentially user-facing (or am I wrong?) so dumping the full &Node... structure in there is probably not useful, I would expect such info only in the log or in clearly non-user-facing location.

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

      4.16+

      How reproducible:

      Like OCPBUGS-33891

      Steps to Reproduce:

      Like OCPBUGS-33891

      Actual results:

      Go struct dump in the message

      Expected results:

      No Go struct dump in the message

            team-mco Team MCO
            afri@afri.cz Petr Muller
            Sergio Regidor de la Rosa Sergio Regidor de la Rosa
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: