StackStorm / st2-auth-ldap

LDAP backend for user authentication in StackStorm. Previously LDAP backend for EWC.
https://docs.stackstorm.com/authentication.html
Apache License 2.0
5 stars 12 forks source link

Prevent LDAP module removal on upgrade #26

Closed LindsayHill closed 7 years ago

LindsayHill commented 7 years ago

The %postun step gets run at the end of an upgrade (confusing, I know).

If a user has an existing BWC system on CentOS/RHEL, and upgrades, we remove the st2-auth-ldap module. The correct approach is to check how many packages will be left on the system after this operation, and only run the removal step if this is the removal of the final version of st2-auth-ldap.

As a workaround, users can either remove/re-install the package with this:

sudo yum remove st2-auth-ldap
sudo yum install bwc-enterprise

Or they can just re-run the %postinst step:

/opt/stackstorm/st2/bin/pip install --find-links /opt/stackstorm/share/wheels --no-index --quiet st2-enterprise-auth-backend-ldap

Related issues: https://github.com/StackStorm/st2/issues/3213 and https://github.com/StackStorm/st2-packages/issues/418

Kami commented 7 years ago

LGTM, let's merge it for v2.2.0, but let's also make sure we test it.