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

'pcs resource delete' fails with a traceback for a bundle with an inner resource and no IP address [rhel-10]

    • pcs-0.12.0-3.el10
    • Yes
    • Moderate
    • rhel-sst-high-availability
    • 26
    • 29
    • 3
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • Release Note Not Required
    • Affected version has never been released in RHEL
    • Unspecified
    • Unspecified
    • Unspecified
    • None

      What were you trying to do that didn't work?

      Delete a resource bundle with a primitive resource inside it and no IP address for the bundle specified. Note that this is a misconfiguration that pcs is preventing. This lowers severity of the issue. Nevertheless, pcs should not crash with a traceback even in this case.

      What is the impact of this issue to you?

      The bundle cannot be deleted using pcs.

      Please provide the package NVR for which the bug is seen:

      pcs-0.12.0-2.el10.x86_64

      How reproducible is this bug?:

      always, easily

      Steps to reproduce

      1. pcs resource bundle create test-bundle container podman image=localhost/pcmktest:test
      2. pcs resource create apa apache bundle test-bundle --force
      3. pcs resource delete test-bundle
      4. pcs resource delete apa

      Expected results

      bundle resource gets deleted

      Actual results

      pcs crashes with a traceback:

      Removing dependant element:
        Resource: 'apa'
      Stopping resources 'apa', 'test-bundle' before deleting
      Traceback (most recent call last):
        File "/usr/sbin/pcs", line 8, in <module>
          sys.exit(main())
                   ^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/app.py", line 268, in main
          routing.create_router(cmd_map, [])(
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/routing.py", line 33, in _router
          return cmd_map[sub_cmd](lib, argv_next, modifiers)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/routing.py", line 33, in _router
          return cmd_map[sub_cmd](lib, argv_next, modifiers)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/resource.py", line 2031, in resource_remove_cmd
          lib.cib.remove_elements(resources_to_remove, force_flags)
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/lib_wrapper.py", line 91, in decorated_run
          return run_with_middleware(run, cli_env, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/middleware.py", line 14, in run
          return next_in_line(env, *args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/middleware.py", line 40, in apply
          result_of_next = next_in_line(env, *args, **kwargs)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/cli/common/lib_wrapper.py", line 82, in run
          lib_call_result = run_library_command(lib_env, *args, **kwargs)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/lib/commands/cib.py", line 57, in remove_elements
          cib = _stop_resources_wait(
                ^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/lib/commands/cib.py", line 101, in _stop_resources_wait
          warn_resource_unmanaged(env.get_cluster_state(), resource_ids)
        File "/usr/lib/python3.12/site-packages/pcs/lib/cib/remove_elements.py", line 254, in warn_resource_unmanaged
          report_list.extend(
        File "/usr/lib/python3.12/site-packages/pcs/lib/cib/remove_elements.py", line 259, in <genexpr>
          if status.is_state(
             ^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/common/resource_status.py", line 516, in is_state
          resource = self._get_instances_for_state_check(resource_id, instance_id)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/usr/lib/python3.12/site-packages/pcs/common/resource_status.py", line 380, in _get_instances_for_state_check
          raise ResourceNonExistentException(resource_id, instance_id)
      pcs.common.resource_status.ResourceNonExistentException: ('apa', None)

              cluster-qe Cluster QE
              tojeline@redhat.com Tomas Jelinek
              Peter Romancik Peter Romancik
              Cluster QE Cluster QE
              Votes:
              0 Vote for this issue
              Watchers:
              12 Start watching this issue

                Created:
                Updated: