Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-2483

[RHC] It is possible to connect to RHC even with invalid server value

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • rhel-7.9.z
    • rhc
    • Normal
    • sst_insights
    • None
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None

          1. Description of problem:

      When I try to connect to RHC using an invalid server value, connect is established and error code is 0.

      ```

      1. connecting with invalid --server
        ✗ rhc connect --username <<value>> --password <<value>> --server "http://non-existent.server"
        Connecting mabezerr-jenkins-rhel79 to Red Hat.
        This might take a few seconds.
      Connecting to Red Hat Subscription Management..WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
      / Connecting to Red Hat Subscription Management..WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
      [...]
      Connecting to Red Hat Subscription Management..WWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
      ● Connected to Red Hat Subscription Management
      ● Activated the Red Hat connector daemon

      Manage your Red Hat connector systems: https://red.ht/connector
      ```

      1. now, checking the error code - I was expecting for "1"
        (iqe_venv) ➜ iqe-rhc-client-plugin git:(ESSNTL-1535) ✗ echo $?
        0
          1. Version-Release number of selected component (if applicable):
            ✗ cat /etc/redhat-release
            Red Hat Enterprise Linux Server release 7.9 (Maipo)
          1. How reproducible:
            call "rhc connect" command and insert any invalid value for --server field.
          1. Steps to Reproduce:
            1. Use rhc command with all necessary fields (username, password, server)
            2. Check output
            3. Run command "echo $?" to see the errorcode on output.
          1. Actual results:
            It is possible to establish connection on RHC with invalid --server value
          1. Expected results:

      I did the same for RHEL9 just to check, and here is the expected behavior:

      1. using same credentials as used on RHEL7
        ✗ rhc connect --username <<value>> --password <<value>> --server "http://non-existent.server"
        Connecting mabezerr-insights-rhel9 to Red Hat.
        This might take a few seconds.

      error: [Errno -2] Name or service not known

      1. Now checking error code, I can see the expected value "1"
        (venv) ➜ iqe_insights_client git:(master) ✗ echo $?
        1
          1. Additional info:
      1. RHC version for RHEL7
        ✗ rhc --version
        rhc version 0.2.0

            jira-bugzilla-migration RH Bugzilla Integration
            mabezerr@redhat.com Maria Clara Bezerra (Inactive)
            RH Bugzilla Integration RH Bugzilla Integration
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: