LDAP plugin not working for 9.1 - propagate_task_deploy >=2.0.0

Bug #1650471 reported by SeanBoran
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Fuel Sustaining

Bug Description

Detailed bug description:
After updating a Fuel environment from 9.0 to 9.1, environments with LDAP can no longer be created

Steps to reproduce:
Create a new env, enable the LDAP plugin, add some settings and click "Save Settings".

Expected results: LDAP plugin enabled.
Actual result:
the error message appears:
"Cannot enable plugin with legacy tasks unless propagate_task_deploy attribute is set. Ensure tasks.yaml is empty and all tasks has version >= 2.0.0."

Reproducibility: On environments created on 9.0 and upgraded or new envs on 9.1

Description of the environment:
Fuel env upgraded from 9.0 a few days ago according to https://docs.mirantis.com/openstack/fuel/fuel-9.1/release-notes/update-product/update-master-9-9-1.html
 Operation system: CentOS Linux release 7.2.1511 Versions of components: LDAP plugin from master branch
Impact: can no longer use a critical component.
Possibly related bugs #1639393 #1619228

Attempted fix:
So the latest version of fuel-plugin-ldap was downloaded and installed, whose most recent commit adds "version: 2.0.0" to deployment_tasks.yaml, which seems useful, but this did not help things.

Analysis:
It seems to be kicked in by /usr/lib/python2.7/site-packages/nailgun/plugins/manager.py line 100, cls.contains_legacy_tasks() (about line 44), which checks that version is at least 2.0.0

So, added in a statement to log the version:
    def contains_legacy_tasks(cls, plugin):
    .....
            task_version = StrictVersion(task.get('version', '0.0.0'))
            logger.warning('DEBUG Check task version min=%s ver=%s task=%s, plugin=%s', min_task_version, task_version, format(task), format(plugin) )

Which gives

Check task version min=2.0 ver=1.0 task={'task_name': u'ldap_plugin', 'parameters': {u'puppet_modules': u'puppet/modules/:/etc/puppet/modules/', u'puppet_manifest': u'puppet/manifests/controller_site.pp', u'timeout': 3600, 'cwd': '/etc/fuel/plugins/ldap-3.0/'}, 'requires': [u'keystone-db', u'keystone', u'horizon'], 'version': u'1.0.0', 'groups': [u'primary-controller', u'controller'], 'required_for': [u'deploy_end'], 'type': 'puppet', 'id': u'ldap_plugin'}, plugin=<nailgun.plugins.adapters.PluginAdapterV3 object at 0x66db310>

Which shows that 1.0.0 is detected!!

But /var/www/nailgun/plugins/ldap-3.0/deployment_tasks.yaml has:
- id: ldap_plugin
  type: puppet
  version: 2.0.0
and there is no trace of a "1.0.0" in the sources under /var/www/nailgun/plugins/ldap-3.0

Can someone help me understand what is going here, or suggest tips?

Tags: area-python
SeanBoran (sean-boran)
description: updated
Revision history for this message
SeanBoran (sean-boran) wrote :

Just found the solution!

# find the id of the LDAP plugin and resync it with the API:
fuel plugins --list
fuel plugins --sync --plugin-id=1

I had update the ldap plugin by doing:
fpb --debug --build . && fuel plugins --update *rpm

But that was obviously not enough.

Changed in fuel:
milestone: none → 9.2
assignee: nobody → Fuel Sustaining (fuel-sustaining-team)
importance: Undecided → High
status: New → Confirmed
tags: added: area-python
Revision history for this message
Vladimir Kuklin (vkuklin) wrote :

Fixed by: https://github.com/openstack/fuel-plugin-ldap/commit/d681925807160bf280f28b51ee8e5cc831eefb26

Sean, you can apply a fix by yourself and sync the plugin or use the latest version. You can also enable propagate_task_deploy parameter for the cluster, but this would slow the deployment down.
Anyway, using the fix above is the preferred solution.

Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
SeanBoran (sean-boran) wrote :

Vladimir: yes, I seen that fix it master (see above), but did not realise one had to "sycy" too.
"You can also enable propagate_task_deploy parameter"
I've heard of this parameter, but where exactly does one add that if needed?

tags: added: on-verification
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 snapshot #691.

Steps to verify:
1. Install 9.0 Fuel master node
2. Update Fuel master node to 9.1 using instruction https://docs.mirantis.com/openstack/fuel/fuel-9.1/release-notes/update-product/update-master-9-9-1.html
3. Install LDAP plugin to master node (rpm file was downloaded from http://mirror.fuel-infra.org/mos-plugins/centos/9.0/ldap-3.0-3.0.0-1.noarch.rpm)
4. Create new 9.1 environment in Fuel UI > Settings tab > Other > Enable 'LDAP plugin for Keystone' and fill required values > Save Settings

Actual results:
Changes are saved. LDAP plugin enabled.

Additional info:
There is the similar bug https://bugs.launchpad.net/fuel-plugins/+bug/1638617 with the same fix. It also worked fine.

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.