Giter Club home page Giter Club logo

Comments (5)

svinota avatar svinota commented on August 29, 2024

Thanks for the feedback, investigating

from pyroute2.

Shaun-3adesign avatar Shaun-3adesign commented on August 29, 2024

I'm also seeing this issue is there any update on a fix?

from pyroute2.

tomkcook avatar tomkcook commented on August 29, 2024

Likewise, almost any attempt to move an interface to a namespace results in this error:

ndb.interfaces.create(ifname="veth0", kind="veth", target="test-ns").commit()
ndb.interfaces.create(ifname="veth0", kind="veth", net_ns_fd="test-ns").commit()
ndb.interfaces.create(ifname="veth0", kind="veth").set("target", "test-ns").commit()
ndb.interfaces.create(ifname="veth0", kind="veth").set("net_ns_fd", "test-ns").commit()

ndb.interfaces.create(ifname="veth0", kind="veth").commit()

with ndb.interfaces["veth0"] as dev:
    dev["target"] = "test-ns"

All give the same error.

from pyroute2.

tomkcook avatar tomkcook commented on August 29, 2024

A quick bit of bisecting gives this working in pyroute2 0.7.6 but failing in 0.7.7.

from pyroute2.

tomkcook avatar tomkcook commented on August 29, 2024

And a git bisect points to 8c6421b as the offending commit. For reference, the result was produced like this:

$ cat > test.py <<EOM
import pyroute2

try:
    ndb = pyroute2.NDB()
    ctx = ndb.begin()
    ctx.push(
        ns := ndb.netns.create("test-2"),
    )

    ctx.push(
        eth0 := ndb.interfaces.create(ifname="eth0", kind="veth", peer="eth0-1").set("target", "test-2")
    )
    ctx.commit()

    ctx = ndb.begin()
    ctx.push(ns.remove())
    ctx.commit()
except:
    exit(10)

exit(0)
EOM
$ python3 -m venv venv/
$ venv/bin/pip install -e .
$ git bisect start HEAD 0.7.6
$ git bisect run sudo venv/bin/python3 test.py

from pyroute2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.