Uploaded image for project: 'Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces) '
  1. Red Hat OpenShift Dev Spaces (formerly CodeReady Workspaces)
  2. CRW-5359 Ansible fixes for Dev Spaces
  3. CRW-4873

Fix provisioning of Jenkins nodes on PSI OSP error "'crw-rhel8' is not valid under any of the given schemas"

XMLWordPrintable

    • False
    • None
    • False

      Provisioning of new Jenkins nodes on PSI OSP is failing because of error:

      ClientResponseException{message=Invalid input for field/attribute imageRef. Value: crw-rhel8. 'crw-rhel8' is not valid under any of the given schemas, status=400, status-code=BAD_REQUEST, X-Openstack-Request-Id=req-7f79c5d1-1bbc-4d51-9a17-3dbf1a1072e9}
      	at org.openstack4j.api.exceptions.ResponseException.mapException(ResponseException.java:58)
      	at org.openstack4j.api.exceptions.ResponseException.mapException(ResponseException.java:70)
      	at org.openstack4j.core.transport.HttpEntityHandler.handleLessThan500(HttpEntityHandler.java:99)
      	at org.openstack4j.core.transport.HttpEntityHandler.handle(HttpEntityHandler.java:45)
      	at org.openstack4j.connectors.okhttp.HttpResponseImpl.getEntity(HttpResponseImpl.java:65)
      	at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:248)
      	at org.openstack4j.openstack.internal.BaseOpenStackService$Invocation.execute(BaseOpenStackService.java:238)
      	at org.openstack4j.openstack.compute.internal.ServerServiceImpl.boot(ServerServiceImpl.java:109)
      	at org.openstack4j.openstack.compute.internal.ServerServiceImpl.bootAndWaitActive(ServerServiceImpl.java:117)
      	at jenkins.plugins.openstack.compute.internal.Openstack._bootAndWaitActive(Openstack.java:612)
      	at jenkins.plugins.openstack.compute.internal.Openstack.bootAndWaitActive(Openstack.java:573)
      Caused: jenkins.plugins.openstack.compute.internal.Openstack$ActionFailed: Invalid input for field/attribute imageRef. Value: crw-rhel8. 'crw-rhel8' is not valid under any of the given schemas
      	at jenkins.plugins.openstack.compute.internal.Openstack.bootAndWaitActive(Openstack.java:600)
      	at jenkins.plugins.openstack.compute.JCloudsSlaveTemplate.provisionServer(JCloudsSlaveTemplate.java:347)
      	at jenkins.plugins.openstack.compute.JCloudsSlaveTemplate.provisionSlave(JCloudsSlaveTemplate.java:217)
      	at jenkins.plugins.openstack.compute.JCloudsCloud$NodeCallable.call(JCloudsCloud.java:332)
      	at jenkins.plugins.openstack.compute.JCloudsCloud$NodeCallable.call(JCloudsCloud.java:319)
      	at jenkins.util.ContextResettingExecutorService$2.call(ContextResettingExecutorService.java:46)
      	at jenkins.security.ImpersonatingExecutorService$2.call(ImpersonatingExecutorService.java:80)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      There was "crw-rhel8" instance running in PSI OSP:

      Root cause of problem:
      https://main-jenkins-csb-crwqe.apps.ocp-c1.prod.psi.redhat.com/job/system/job/jenkins-node-setup/862/consoleFull failed to recreate "crw-rhel8" image:

      23:55:49  TASK [openstack-snapshot : instance: crw-rhel8, image: crw-rhel8] **************
      23:55:49  An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ModuleNotFoundError: No module named 'OpenSSL'
      23:55:49  fatal: [10.0.213.68]: FAILED! => {"changed": false, "module_stderr": "Traceback (most recent call last):\n  File \"/home/hudson/.ansible/tmp/ansible-tmp-1695675337.4753623-8404-173201087369137/AnsiballZ_openstack.py\", line 100, in <module>\n    _ansiballz_main()\n  File \"/home/hudson/.ansible/tmp/ansible-tmp-1695675337.4753623-8404-173201087369137/AnsiballZ_openstack.py\", line 92, in _ansiballz_main\n    invoke_module(zipped_mod, temp_path, ANSIBALLZ_PARAMS)\n  File \"/home/hudson/.ansible/tmp/ansible-tmp-1695675337.4753623-8404-173201087369137/AnsiballZ_openstack.py\", line 41, in invoke_module\n    run_name='__main__', alter_sys=True)\n  File \"/usr/lib64/python3.6/runpy.py\", line 205, in run_module\n    return _run_module_code(code, init_globals, run_name, mod_spec)\n  File \"/usr/lib64/python3.6/runpy.py\", line 96, in _run_module_code\n    mod_name, mod_spec, pkg_name, script_name)\n  File \"/usr/lib64/python3.6/runpy.py\", line 85, in _run_code\n    exec(code, run_globals)\n  File \"/tmp/ansible_openstack_payload_z4pfs28f/ansible_openstack_payload.zip/ansible/modules/openstack.py\", line 88, in <module>\n  File \"/tmp/ansible_openstack_payload_z4pfs28f/ansible_openstack_payload.zip/ansible/modules/openstack.py\", line 84, in main\n  File \"/tmp/ansible_openstack_payload_z4pfs28f/ansible_openstack_payload.zip/ansible/modules/openstack.py\", line 50, in create_image\n  File \"/tmp/ansible_openstack_payload_z4pfs28f/ansible_openstack_payload.zip/ansible/modules/openstack.py\", line 32, in get_glance_client\n  File \"/usr/local/lib/python3.6/site-packages/glanceclient/client.py\", line 62, in Client\n    'client')\n  File \"/usr/local/lib/python3.6/site-packages/oslo_utils/importutils.py\", line 97, in import_versioned_module\n    return import_module(module_str)\n  File \"/usr/local/lib/python3.6/site-packages/oslo_utils/importutils.py\", line 73, in import_module\n    __import__(import_str)\n  File \"/usr/local/lib/python3.6/site-packages/glanceclient/v2/__init__.py\", line 15, in <module>\n    from glanceclient.v2.client import Client      # noqa\n  File \"/usr/local/lib/python3.6/site-packages/glanceclient/v2/client.py\", line 17, in <module>\n    from glanceclient.common import http\n  File \"/usr/local/lib/python3.6/site-packages/glanceclient/common/http.py\", line 23, in <module>\n    import OpenSSL\nModuleNotFoundError: No module named 'OpenSSL'\n", "module_stdout": "", "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error", "rc": 1}
      

      As a result, there was no "crw-rhel8" image available on PSI OSP.
      Related changes: https://gitlab.cee.redhat.com/codeready-workspaces/ansible-scripts/-/commit/5c319c315c602161071cf3fddfb6f4323b3621bb

            dnochevn Dmytro Nochevnov
            dnochevn Dmytro Nochevnov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: