Remove the scapy dependency in the rogue dhcp validations

Bug #1634023 reported by Tomas Sedovic
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Medium
Martin André

Bug Description

We have a couple of validations that check for DHCP responses on interfaces where there should be none. It's now using scapy, but we're having to do workarounds to make that dependency available. We should just write an Ansible module that checks for DHCP responses directly.

https://review.openstack.org/#/c/353973/

Some links:

http://code.activestate.com/recipes/577649-dhcp-query/
https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol

Tags: validations
Revision history for this message
Dan Trainor (dtrainor) wrote :

This validation will always fail in the rogue-dhcp validation that's in Newton, with the following error:

/var/log/mistral/engine.log:2016-11-11 14:34:07.161 32287 INFO workflow_trace [-] Task 'run_validation' (2e98c310-1da5-456c-a3f5-6c13366913fb) [RUNNING -> ERROR, msg={u'stderr': u'', u'stdout': u"Task 'Install scapy' failed:\nHost: localhost\nMessage: Failed to find required executable virtualenv\n\nFailure! The validation failed for the following hosts:\n* localhost\n"}] (execution_id=6cd7c9d0-94a2-4ddd-9ea3-4c3b39417887)

Steven Hardy (shardy)
Changed in tripleo:
milestone: ocata-1 → ocata-2
Revision history for this message
Tomas Sedovic (tsedovic) wrote :

Yeah, that's weird. The problem is that virtualenv (i.e. python-virtualenv package) is missing in your setup. Every time, I tried this in mine, the package was already installed. So we'll have to update the validation to do that.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (master)

Fix proposed to branch: master
Review: https://review.openstack.org/397314

Changed in tripleo:
assignee: nobody → Tomas Sedovic (tsedovic)
status: Triaged → In Progress
Revision history for this message
Tomas Sedovic (tsedovic) wrote :

Dan: this should solve the issue you're having but does not close the bug (because that's about removing scapy entirely).

Revision history for this message
Dan Trainor (dtrainor) wrote :

Sounds good. My concern was that this dependency was not available in a vanilla OS install or in a RHEL release.

Revision history for this message
Tomas Sedovic (tsedovic) wrote :

It should be. Or at least it was in my RHEL-based setup.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.openstack.org/397314
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=32620fe025dc416c51c8ecca25a1f1ce8ceb8d7a
Submitter: Jenkins
Branch: master

commit 32620fe025dc416c51c8ecca25a1f1ce8ceb8d7a
Author: Tomas Sedovic <email address hidden>
Date: Mon Nov 14 18:27:58 2016 +0100

    Fix the DHCP validations

    Some of the environments don't have virtualenv installed by default
    which makes the `pip` module fail.

    In addition, the latest release of scapy seems broken on RHEL (from
    scapy.all import BOOTP raises an exception) so we explicitly specify an
    older release that works.

    Partial-Bug: #1634023
    Change-Id: I5bfd1d38a647c6846d4889c0ec7a8a2d659f7647

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/397727

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (stable/newton)

Reviewed: https://review.openstack.org/397727
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=e4ef2730b3a41489283f5ee7d4548a934c845c77
Submitter: Jenkins
Branch: stable/newton

commit e4ef2730b3a41489283f5ee7d4548a934c845c77
Author: Tomas Sedovic <email address hidden>
Date: Mon Nov 14 18:27:58 2016 +0100

    Fix the DHCP validations

    Some of the environments don't have virtualenv installed by default
    which makes the `pip` module fail.

    In addition, the latest release of scapy seems broken on RHEL (from
    scapy.all import BOOTP raises an exception) so we explicitly specify an
    older release that works.

    Partial-Bug: #1634023
    Change-Id: I5bfd1d38a647c6846d4889c0ec7a8a2d659f7647
    (cherry picked from commit 32620fe025dc416c51c8ecca25a1f1ce8ceb8d7a)

tags: added: in-stable-newton
Tomas Sedovic (tsedovic)
Changed in tripleo:
status: In Progress → Triaged
Changed in tripleo:
milestone: ocata-2 → ocata-3
tags: removed: in-stable-newton
Changed in tripleo:
milestone: ocata-3 → pike-1
Changed in tripleo:
milestone: pike-1 → pike-2
Changed in tripleo:
milestone: pike-2 → pike-3
Revision history for this message
Emilien Macchi (emilienm) wrote :

There are no currently open reviews on this bug, changing the status back to the previous state and unassigning. If there are active reviews related to this bug, please include links in comments.

Changed in tripleo:
assignee: Tomas Sedovic (tsedovic) → nobody
Revision history for this message
Julie Pichon (jpichon) wrote :
Changed in tripleo:
status: Triaged → Fix Released
assignee: nobody → Martin André (mandre)
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.