Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin model upgrade: object has no attribute '_reload' #2685

Closed
IamTheFij opened this issue Oct 10, 2020 · 0 comments · Fixed by #2687
Closed

Plugin model upgrade: object has no attribute '_reload' #2685

IamTheFij opened this issue Oct 10, 2020 · 0 comments · Fixed by #2687

Comments

@IamTheFij
Copy link
Contributor

I've already got a fix for this that I'm about to submit. For reference, here are the steps to reproduce in ipython:

~$ ipython                                                                     [venv]
Python 3.7.6 (default, Dec 22 2019, 01:09:06)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import docker

In [2]: c = docker.DockerClient(base_url='unix://var/run/docker.sock')

In [3]: p = c.plugins.get('loki')

In [4]: list(p.upgrade("grafana/loki-docker-driver:latest"))
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-4-e5fc26fa0514> in <module>
----> 1 list(p.upgrade("grafana/loki-docker-driver:latest"))

~/venv/lib/python3.7/site-packages/docker/models/plugins.py in upgrade(self, remote)
    120         for d in self.client.api.upgrade_plugin(self.name, remote, privileges):
    121             yield d
--> 122         self._reload()
    123
    124

AttributeError: 'Plugin' object has no attribute '_reload'
docker==4.3.1
Python 3.7.6
Client: Docker Engine - Community
 Cloud integration  0.1.18
 Version:           19.03.13
 API version:       1.40
 Go version:        go1.13.15
 Git commit:        4484c46d9d
 Built:             Wed Sep 16 16:58:31 2020
 OS/Arch:           darwin/amd64
 Experimental:      true

Server: Docker Engine - Community
 Engine:
  Version:          19.03.13
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.15
  Git commit:       4484c46d9d
  Built:            Wed Sep 16 17:07:04 2020
  OS/Arch:          linux/amd64
  Experimental:     true
 containerd:
  Version:          v1.3.7
  GitCommit:        8fba4e9a7d01810a393d5d25a3621dc101981175
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant