coreos / kpm

KPM is a tool to deploy and manage application stacks on Kubernetes.
Apache License 2.0
124 stars 29 forks source link

kpm local registry method not allowed #136

Closed salkin closed 7 years ago

salkin commented 7 years ago

Following the procedure in (https://github.com/coreos/kpm/blob/master/Documentation/hacking.md) trying to push a new package generates METHOD NOT ALLOWED. I tried this on two different hosts with same result.

Registry is working as dashboard page is shown at localhost:5000/dashboard

[nwik@laptop` bar]$ kpm list -H http://localhost:5000 
app    version    downloads
-----  ---------  -----------
[nwik@laptop bar]$ kpm push -H http://localhost:5000 -f
Traceback (most recent call last):
  File "/usr/bin/kpm", line 6, in <module>
    cli()
  File "/usr/lib/python2.7/site-packages/kpm/command.py", line 63, in cli
    args.func(args)
  File "/usr/lib/python2.7/site-packages/kpm/commands/command_base.py", line 16, in call
    self(options)()
  File "/usr/lib/python2.7/site-packages/kpm/commands/command_base.py", line 19, in __call__
    self._call()
  File "/usr/lib/python2.7/site-packages/kpm/commands/push.py", line 41, in _call
    "blob": base64.b64encode(f.read())}, self.force)
  File "/usr/lib/python2.7/site-packages/kpm/registry.py", line 96, in push
    r.raise_for_status()
  File "/usr/lib/python2.7/site-packages/requests/models.py", line 884, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 405 Client Error: METHOD NOT ALLOWED for url: `http://localhost:5000/api/v1/packages/nwik/bar?force=true

[nwik@laptop bar]$ kpm version -H http://localhost:5000
Api-version: {u'kpm-api': u'0.22.0', u'cnr-api': u'0.0.2'}
Client-version: 0.21.1
ant31 commented 7 years ago

Thanks for report,

I'm looking at it.

salkin commented 7 years ago

I tried the tagged release v0. 20 and that was working ok with the instructions.

ant31 commented 7 years ago

Yes, we are working on delegating the API to https://github.com/cn-app-registry/cnr-server, to get a converged workflow(push/pull/login) experience with the different application packagers (helm/docker-compose/kpm...), so master may not uptodate with cnr-server.

I let issue open until fixed on master, Thanks

ant31 commented 7 years ago

Latest version have been pushed.