[Pulp-list] pulp-cli migration plan create FAIL

Ben Stanley ben.stanley at gmail.com
Wed May 5 06:01:41 UTC 2021


Matthias,

I have created a pull request for this issue. I haven't built it to test 
that I did it right, but it looks the same as other instances on the 
same page so I suspect it will work.

https://github.com/jalapenopuzzle/pulp-2to3-migration/pull/1

Ben.

On 4/5/21 6:28 pm, Matthias Dellweg wrote:
> Hello Stan,
> thank you for reporting this. First of all, you are right about the 
> `--plan`. Are you willing to send a PR for that mistake?
> Let me first ask you the typical support questions: Which version of 
> the migration plugin and the CLI is this?
> The error looks to me like the CLI get's an unexpected answer from the 
> server, and that can have multiple reasons.
> 1. the cached api-spec of the CLI is outdated. Please run `pulp <...> 
> status` and look for "Notice: Cached api is outdated. Refreshing...". 
> After that, try again.
> 2. the server does not reply in the way, it's api-spec promises
> 3. something in the reverse proxy garbles the result
> Can you please try to rerun your command with `pulp -vvv 
> --no-verify-ssl --username USERNAME ...` to add some debugging output. 
> It will show you the requests sent to the server as well as the 
> responses. I hope this can give some insight.
>
> On Tue, May 4, 2021 at 2:18 AM Ben Stanley <ben.stanley at gmail.com 
> <mailto:ben.stanley at gmail.com>> wrote:
>
>     Hello pulp-list,
>
>     I am attempting to migrate my pulp2 to pulp3.
>
>     I seem to be facing difficulties at every step.
>
>     After overcoming the initial difficulties of installation, I am
>     now up to trying to migrate the data. Looking at the migration
>     documentation:
>
>     https://pulp-2to3-migration.readthedocs.io/en/latest/workflows.html
>     <https://pulp-2to3-migration.readthedocs.io/en/latest/workflows.html>
>
>     I note that the command in the documentation is incorrect:
>
>     [root at honeybee plans]# *pulp --no-verify-ssl --username
>     */*USERNAME*/*--password */*PASSWORD*/*migration plan create
>     plan='{"plugins": [{"type": "iso"}]}'*
>
>     Usage: pulp migration plan create [OPTIONS]
>
>     Try 'pulp migration plan create --help' for help.
>
>
>     Error: Missing option '--plan'.
>
>     [root at honeybee plans]#
>
>     The documentation should be corrected to use --plan=<stuff>
>     instead of plan=<stuff> .
>
>     Even after I corrected the command to use --plan=<stuff>, I got a
>     huge error message.
>
>     root at honeybee plans]# *pulp --no-verify-ssl --username
>     */*USERNAME*/*--password */*PASSWORD*/*migration plan create
>     --plan='{"plugins": [{"type": "iso"}]}'*
>
>     Traceback (most recent call last):
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/openapi.py",
>     line 219, in parse_response
>
>     response_spec = method_spec["responses"][str(response.status_code)]
>
>     KeyError: '200'
>
>
>     During handling of the above exception, another exception occurred:
>
>
>     Traceback (most recent call last):
>
>     File "/usr/local/bin/pulp", line 8, in <module>
>
>     sys.exit(main())
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 829, in __call__
>
>     return self.main(*args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 782, in main
>
>     rv = self.invoke(ctx)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 1259, in invoke
>
>     return _process_result(sub_ctx.command.invoke(sub_ctx))
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 1259, in invoke
>
>     return _process_result(sub_ctx.command.invoke(sub_ctx))
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 1259, in invoke
>
>     return _process_result(sub_ctx.command.invoke(sub_ctx))
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 1066, in invoke
>
>     return ctx.invoke(self.callback, **ctx.params)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 610, in invoke
>
>     return callback(*args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/decorators.py",
>     line 73, in new_func
>
>     return ctx.invoke(f, obj, *args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 610, in invoke
>
>     return callback(*args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/decorators.py",
>     line 73, in new_func
>
>     return ctx.invoke(f, obj, *args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/click/core.py",
>     line 610, in invoke
>
>     return callback(*args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/generic.py",
>     line 287, in callback
>
>     result = entity_ctx.create(body=body)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/context.py",
>     line 364, in create
>
>     self.CREATE_ID, parameters=_parameters, body=body,
>     non_blocking=non_blocking
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/context.py",
>     line 129, in call
>
>     result = self.api.call(operation_id, *args, **kwargs)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/openapi.py",
>     line 284, in call
>
>     return self.parse_response(method_spec, response)
>
>     File
>     "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cli/common/openapi.py",
>     line 222, in parse_response
>
>     response_spec = method_spec["responses"][str(100 *
>     int(response.status_code / 100))]
>
>     KeyError: '200'
>
>     [root at honeybee plans]#
>
>
>
>     What do I need to fix to proceed with my migration?
>
>     And I'd also like to know how I can get it to work without having
>     to specify --no-verify-ssl . Note that I have a self-signed
>     certificate. I don't mind pointing the pulp command to the
>     self-signed certificate file so that it will accept it, but I
>     don't know how to do that.
>
>     Thanks,
>     Ben Stanley.
>
>
>     _______________________________________________
>     Pulp-list mailing list
>     Pulp-list at redhat.com <mailto:Pulp-list at redhat.com>
>     https://listman.redhat.com/mailman/listinfo/pulp-list
>     <https://listman.redhat.com/mailman/listinfo/pulp-list>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/pulp-list/attachments/20210505/5c8e8971/attachment.htm>


More information about the Pulp-list mailing list