Bug 217274

Summary: sysutils/py-salt: added other variants to install individual programs
Product: Ports & Packages Reporter: laza_bsd
Component: Individual Port(s)Assignee: Christer Edwards <christer.edwards>
Status: Closed Not Accepted    
Severity: Affects Some People CC: christer.edwards, j, swills, w.schwarzenfeld, woodsb02
Priority: --- Flags: bugzilla: maintainer-feedback? (christer.edwards)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
svn diff
none
svn diff
none
svn diff
none
svn diff
none
svn diff none

Description laza_bsd 2017-02-21 13:29:42 UTC
Created attachment 180188 [details]
svn diff

I created 3 different ports (depending on the master sysutils/py-salt) to install only the necessary services.(minion, master and proxy)
proxy and the master can not coexist in the same installation, instead you can install minion with master or proxy.
Comment 1 Christer Edwards 2017-02-21 23:54:00 UTC
I'm going to do some testing before I approve, but I like the effort and the idea.

Can you tell me a bit more about the config options?

API - Does this refer to the Salt Master API?
MINION - Required for py-salt-minion?
RAET - Enable RAET transport
SYNDIC - Required for py-salt-?
ZEROMQ - Enable ZeroMQ transport
MASTER - Required for py-salt-master?
PROXY - Required for py-salt-proxy?

What settings do you suggest for sane defaults?

Why can the proxy and master not coexist?

Thanks
Comment 2 laza_bsd 2017-02-22 15:35:03 UTC
Created attachment 180221 [details]
svn diff
Comment 3 laza_bsd 2017-02-22 15:36:35 UTC
for splitting the ports I've used the USE_RC_SUBR=
so it's not a complete separation of the programs.

> API - Does this refer to the Salt Master API?
yes
> MINION - Required for py-salt-minion?
yes
> RAET - Enable RAET transport
> SYNDIC - Required for py-salt-?
in the patch attached I've also added this subports py-salt-syndic

> ZEROMQ - Enable ZeroMQ transport
> MASTER - Required for py-salt-master?
yes
> PROXY - Required for py-salt-proxy?
yes.
> What settings do you suggest for sane defaults?

for all ZEROMQ
for the base port MASTER and MINION

Also I've discovered that there is no problem of conflicts between the various modules.
Comment 4 laza_bsd 2017-02-22 15:42:45 UTC
Created attachment 180222 [details]
svn diff

the api are usable only in case of MASTER, PROXY or SYNDIC
Comment 5 Jason Wolfe 2017-02-22 20:35:18 UTC
It might also be worth noting that syndic requires master and proxy requires minion
Comment 6 Jason Wolfe 2017-02-22 20:41:17 UTC
Actually you could run a proxy without a minion if you configured it by hand, but in the spirit of Salt usually a local minion would configure the local proxy. One other note is that the API doesn't interface with a proxy directly, so coupling those 2 seems a bit odd. The master communicates with the proxy, so not sure what the API on the proxy would do.
Comment 7 Christer Edwards 2017-02-22 21:15:24 UTC
Good feedback.

Syndic does require master, and I'd suggest proxy require minion as well.

I've also discovered a few plist errors in poudriere testport with this patch. Can one of you take a look at those?

-----

===> Checking for items in STAGEDIR missing from pkg-plist
Error: Orphaned: @dir %%ETCDIR%%
===> Checking for items in pkg-plist which are not in STAGEDIR
Error: Missing: @comment
Error: Missing: @comment
Error: Missing: @comment
===> Error: Plist issues found.
*** Error code 1

Stop.
make: stopped in /usr/ports/sysutils/py-salt
====>> Error: check-plist failures detected

-----
Comment 8 laza_bsd 2017-02-23 17:20:57 UTC
Created attachment 180245 [details]
svn diff

I've fixed the pkg-plist problems making different files for each type of server.

syndic implies master and api
proxy implies minion
master implies api

on the master ports if you choose nothing nothing will be installed.. :-)


I've tested with a clean poudriere and it compiles and create pkgs without errors.
Comment 9 Christer Edwards 2017-02-23 20:01:45 UTC
In doing some testing with this latest patch I find that I'm unable to install both py27-salt-master and py27-salt-minion, or py27-salt-master and py27-salt-syndic. These packages are all using default options.


emma ~ # pkg info | grep py27-salt
py27-salt-master-2016.11.2     Distributed remote execution and configuration management system
emma ~ # pkg install py27-salt-minion
Updating emma repository catalogue...
emma repository is up-to-date.
All repositories are up-to-date.
Checking integrity... done (1 conflicting)
  - py27-salt-minion-2016.11.2 conflicts with py27-salt-master-2016.11.2 on /usr/local/lib/python2.7/site-packages/salt/_syspaths.py
Comment 10 laza_bsd 2017-02-24 15:14:02 UTC
Created attachment 180260 [details]
svn diff

> In doing some testing with this latest patch I find that I'm unable to install
> both py27-salt-master and py27-salt-minion, 
> or py27-salt-master and py27-salt-syndic.
> These packages are all using default options.

It's not a bug it's a feature.. :-)
I've not separated the PLIST in the different modules, I don't know how to do it
or it's not possible due to some common libraries or files
for example  salt/modules/tls.py it's common to all the modules.

I've changed the defaults for the master package
now it configures all the modules (API MINION MASTER PROXY SYNDIC) as it was before.

I've inserted CONFLICTS_INSTALL to manage the conflict

I've fixed the PLIST for each modules

I don't know how to fix(or if it's possible) to fix the pkg-messages for each module.
Comment 11 Walter Schwarzenfeld freebsd_triage 2018-03-06 19:04:43 UTC
ping!
Comment 12 Steve Wills freebsd_committer freebsd_triage 2019-04-30 13:21:55 UTC
Any status update here? Should we close this?
Comment 13 Christer Edwards 2019-05-25 14:21:29 UTC
+1 to close.
Comment 14 laza_bsd 2019-05-27 07:54:27 UTC
+1 for close also from me.
I don't use anymore salt
Comment 15 Ben Woods freebsd_committer freebsd_triage 2020-03-06 22:59:00 UTC
Closing this bug as per comments #13 and #14