这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jazzzz
Copy link
Contributor

@jazzzz jazzzz commented Dec 4, 2013

If several plugins install new packages with apt-get, dokku plugins-install breaks because pluginhook runs scripts in parallel, and apt-getcannot run in parallel (dpkg locks /var/lib/apt/lists/lock).
This happens as soon as we add a plugin using apt-get (like dokku-mongodb-plugin) since nginx-vhosts already calls apt-get.
This PR fixes it by running hooks in series (progrium/pluginhook#1 would be a nicer fix).

@wingrunr21
Copy link
Contributor

I'd prefer plugins-install not be installing dependencies in the first place. Needless to say this is an issue no matter what the name of the hook

#276

@jazzzz
Copy link
Contributor Author

jazzzz commented Dec 4, 2013

A dependencies hook would be nice, but it seems to me that the PR #276 has the same issue of trying to install packages in parallel.

@wingrunr21
Copy link
Contributor

Yes, it's an issue no matter the name of the hook.

@jazzzz
Copy link
Contributor Author

jazzzz commented Dec 4, 2013

I should read comments more carefully 😓

@wingrunr21
Copy link
Contributor

😄

The only issue I see with running things in serial is eventually someone is going to want to put an order of some kind on things. How will that be handled?

@jazzzz
Copy link
Contributor Author

jazzzz commented Dec 4, 2013

pluginhook already defines an order: the alphabetic order (see https://github.com/progrium/pluginhook#pipeline-filtering-with-plugins).

@wingrunr21
Copy link
Contributor

The order is just file system order since it takes a glob of the directory its passed (https://github.com/progrium/pluginhook/blob/master/pluginhook.go#L24)

I'm just saying that IMO serial execution invites plugins that depend on other plugins during the installation process. I think plugins should be relatively "self-contained" as opposed to making system level modifications and the like.

@jazzzz
Copy link
Contributor Author

jazzzz commented Dec 4, 2013

Globs are lexicographically ordered, and pluginhook already specify how to handle plugins requiring an order of execution.
Plugin hooks are already ordered, this PR doesn't change this, it only fixes plugins that are currently broken because they depend on external packages (like dokku-mongodb-plugin, dokku-postgresql-plugin
and probably many others).

@plietar
Copy link
Contributor

plietar commented Dec 4, 2013

I don't like the way of doing this. We're just reimplementing pluginhook there.
I'd rather fix progrium/pluginhook#1 instead.

I'll leave this open, just as a reminder.

@jazzzz
Copy link
Contributor Author

jazzzz commented Dec 9, 2013

I just did the same as commit 455be29 to be able to use some plugins. Fixing progrium/pluginhook#1 would be ideal, but there is not much activity...

@plietar
Copy link
Contributor

plietar commented Dec 13, 2013

Fixed by progrium/pluginhook#8.
Just run make install again to upgrade.

@plietar plietar closed this Dec 13, 2013
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 this pull request may close these issues.

3 participants