You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Operation orphans_cleanup_cleanup was attempted in fake mode
Steps to reproduce
pulp orphan cleanup --protection-time 0
Expected behavior
The usual safe mode error
Stacktrace/Error log
vagrant@centos9-katello-devel-stable ~ $ sudo pulp orphan cleanup --protection-time 0
Traceback (most recent call last):
File "/usr/lib/python3.11/site-packages/pulp_glue/common/context.py", line 375, in call
result = self.api.call(
^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulp_glue/common/openapi.py", line 721, in call
raise UnsafeCallError(_("Call aborted due to safe mode"))
pulp_glue.common.openapi.UnsafeCallError: Call aborted due to safe mode
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/bin/pulp", line 8, in <module>
sys.exit(main())
^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1055, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/cli/common/generic.py", line 312, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/cli/common/generic.py", line 312, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/cli/common/generic.py", line 312, in invoke
return super().invoke(ctx)
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/decorators.py", line 84, in new_func
return ctx.invoke(f, obj, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/click/core.py", line 760, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulpcore/cli/core/orphan.py", line 58, in cleanup
pulp_ctx.output_result(orphan_ctx.cleanup(kwargs))
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulp_glue/core/context.py", line 297, in cleanup
result = self.call("cleanup", body=body)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulp_glue/common/context.py", line 609, in call
return self.pulp_ctx.call(
^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.11/site-packages/pulp_glue/common/context.py", line 382, in call
raise NotImplementedFake(f"Operation {operation_id} was attempted in fake mode.")
pulp_glue.common.context.NotImplementedFake: Operation orphans_cleanup_cleanup was attempted in fake mode.
When fake mode was not explicitely selected complaining about unsafe
calls in fake_mode is not nice. Instead, we fall back to the original
error message in that case.
fixespulp#1037
When fake mode was not explicitely selected complaining about unsafe
calls in fake_mode is not nice. Instead, we fall back to the original
error message in that case.
fixes#1037
(cherry picked from commit 00ede19)
When fake mode was not explicitely selected complaining about unsafe
calls in fake_mode is not nice. Instead, we fall back to the original
error message in that case.
fixes#1037
(cherry picked from commit 00ede19)
Summary
Running orphan cleanup on pulp-cli 0.27.1 causes:
Steps to reproduce
pulp orphan cleanup --protection-time 0
Expected behavior
The usual safe mode error
Stacktrace/Error log
Pulp and pulp-cli version info
The text was updated successfully, but these errors were encountered: