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

monitor-add-nodes Error: open .addnodesparams: permission denied

XMLWordPrintable

    • Important
    • No
    • Rejected
    • False
    • Hide

      None

      Show
      None
    • Hide
      * Previously, the `monitor-add-nodes` command, which is used to monitor the process of adding nodes to an Agent-based cluster, failed to run due to a permission error. With this update, the command is configured to operate in the correct directory where it has permissions. (link:https://issues.redhat.com/browse/OCPBUGS-34388[*OCPBUGS-34388*])
      Show
      * Previously, the `monitor-add-nodes` command, which is used to monitor the process of adding nodes to an Agent-based cluster, failed to run due to a permission error. With this update, the command is configured to operate in the correct directory where it has permissions. (link: https://issues.redhat.com/browse/OCPBUGS-34388 [* OCPBUGS-34388 *])
    • Bug Fix
    • Done

      This is a clone of issue OCPBUGS-34040. The following is the description of the original issue:

      Description of problem:

      monitor-add-nodes.sh returns Error: open .addnodesparams: permission denied. 

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

      4.16    

      How reproducible:

      sometimes

      Steps to Reproduce:

          1. Monitor adding a day2 node using monitor-add-nodes.sh
          2.
          3.
          

      Actual results:

          Error: open .addnodesparams: permission denied. 

      Expected results:

          monitor-add-nodes runs successfully

      Additional info:

      rh-ee-zniu found an issue the node-joiner-monitor.sh

      [core@ocp-edge49 installer]$ ./node-joiner-monitor.sh 192.168.122.6 namespace/openshift-node-joiner-mz8anfejbn created serviceaccount/node-joiner-monitor created clusterrole.rbac.authorization.k8s.io/node-joiner-monitor unchanged clusterrolebinding.rbac.authorization.k8s.io/node-joiner-monitor configured pod/node-joiner-monitor created Now using project "openshift-node-joiner-mz8anfejbn" on server "https://api.ostest.test.metalkube.org:6443". pod/node-joiner-monitor condition met time=2024-05-21T09:24:19Z level=info msg=Monitoring IPs: [192.168.122.6] Error: open .addnodesparams: permission denied Usage: node-joiner monitor-add-nodes [flags] Flags: -h, --help help for monitor-add-nodes Global Flags: --dir string assets directory (default ".") --kubeconfig string Path to the kubeconfig file. --log-level string log level (e.g. "debug | info | warn | error") (default "info") time=2024-05-21T09:24:19Z level=fatal msg=open .addnodesparams: permission denied Cleaning up Removing temporary file /tmp/nodejoiner-mZ8aNfEjbn
      [~afasano@redhat.com]  found the root cause, the working directory was not set, so the pwd folder /output is used, and is not writable. An easy fix would be to just use /tmp, ie:
      {code:java}
      command: ["/bin/sh", "-c", "node-joiner monitor-add-nodes $ipAddresses --dir=/tmp --log-level=info; sleep 5"] 
      
      

            rwsu1@redhat.com Richard Su
            openshift-crt-jira-prow OpenShift Prow Bot
            zhenying niu zhenying niu
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: