ImportError: cannot import name ConsistentHashSortOrder

Bug #1673911 reported by Paul Greenberg
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
BaGPipe
Invalid
Undecided
Unassigned

Bug Description

When running `bagpipe-bgp`, I receive the following error:

```
Traceback (most recent call last):
  File "/usr/bin/bagpipe-bgp", line 6, in <module>
    from networking_bagpipe.bagpipe_bgp.bgp_daemon import daemon_main
  File "/usr/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/bgp_daemon.py", line 28, in <module>
    from networking_bagpipe.bagpipe_bgp.engine import exabgp_peer_worker
  File "/usr/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/engine/__init__.py", line 42, in <module>
    from networking_bagpipe.bagpipe_bgp.engine import exa
  File "/usr/lib/python2.7/site-packages/networking_bagpipe/bagpipe_bgp/engine/exa.py", line 34, in <module>
    from exabgp.bgp.message.update.attribute.community.extended \
ImportError: cannot import name ConsistentHashSortOrder
```

Additional information:

```
# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.3 (Maipo)

# exabgp --version
ExaBGP : 3.4.17
Python : 2.7.5 (default, Aug 2 2016, 04:20:16) [GCC 4.8.5 20150623 (Red Hat 4.8.5-4)]
Uname : #1 SMP Mon Feb 20 02:37:52 EST 2017
```

The issue might be related to this PR https://github.com/Exa-Networks/exabgp/pull/444

Revision history for this message
Paul Greenberg (greenpau) wrote :
Revision history for this message
Paul Greenberg (greenpau) wrote :

Commented out the line:

```
#from exabgp.bgp.message.update.attribute.community.extended \
# import ConsistentHashSortOrder
```

Then, had an issue with several others. Had to comment out and amend.

```
#from exabgp.bgp.message.update.attribute.community.extended \
# import RouteTarget as RTExtCom

from exabgp.bgp.message.update.attribute.community.extended.rt import RouteTarget as RTExtCom

#from exabgp.bgp.message.update.attribute.community.extended \
# import RouteTargetASN2Number as RouteTarget

from exabgp.bgp.message.update.attribute.community.extended.rt \
    import RouteTargetASN4Number as RouteTarget

```

Next, the errors continue:

```
    from exabgp.bgp.message.update.attribute.community.extended.rt_record import RTRecord
ImportError: No module named rt_record
```

Revision history for this message
Paul Greenberg (greenpau) wrote :

The issues got resolved when I installed the `exabgp` from Github. Before, I used `exabgp` from `pip install`.

```
cd ~ && git clone https://github.com/Exa-Networks/exabgp.git
cd ~/exabgp && git log

commit 15dfe038d41e0c2c2622bd4e28d548a7b248a02d
Merge: 0067c0e 88ef753
Author: Vincent Bernat <email address hidden>
Date: Thu Mar 16 15:07:20 2017 +0100

    Merge pull request #587 from aj-gh/healthcheck-dynip-fix

    healthcheck.py: Fix nonexistent option name - ips_deleted vs. ip_dynamic
```

Finally:

```
cd ~/exabgp && python setup.py install
```

Now, no failures:

```
# bagpipe-bgp --version
bagpipe-bgp 6.0.1.dev68
#
```

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

Again, sorry for failing to follow up on this.

You correctly guessed that exabgp 3.x is not recent enough for networking-bagpipe.
You need to use a exabgp >= 4.0.x

The next release of networking-bagpipe shipping with bagpipe-bgp in it will soon be released and will be installable with:

  pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike networking-bagpipe=7.0.0

In the meantime, you need to git clone, installing with "pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/pike . " will install networking-bagpipe with correct dependencies.

Revision history for this message
Thomas Morin (tmmorin-orange) wrote :

Sorry, the last paragraph should have been:

In the meantime, you need to git clone, installing with "pip install -c https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master . " will install networking-bagpipe with correct dependencies.

Changed in networking-bagpipe:
status: New → Invalid
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.