Bug 255054 - vtnet0: jng files to run: ngctl msg vtnet0: setpromisc 1: ngctl: send msg: Operation not supported
Summary: vtnet0: jng files to run: ngctl msg vtnet0: setpromisc 1: ngctl: send msg: Op...
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 13.0-STABLE
Hardware: Any Any
: --- Affects Some People
Assignee: Aleksandr Fedorov
URL:
Keywords:
Depends on: 254343
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-14 14:56 UTC by Tim Foster
Modified: 2022-02-23 11:10 UTC (History)
6 users (show)

See Also:
koobs: mfc-stable13?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Foster 2021-04-14 14:56:36 UTC
Having recently upgraded to 13.0-STABLE, I found that none of my jng-enabled jails were coming up after boot.

root@puroto:/ # service jail start pupuru
Starting jails: cannot start jail  "pupuru":
ngctl: send msg: Operation not supported
jail: pupuru: jng bridge pupuru vtnet0: failed
.
root@puroto:/ #

In this case the jails.conf entry was:

pupuru {
  exec.prestart += "jng bridge pupuru vtnet0";
  exec.poststop += "jng shutdown pupuru";
}

Digging into what jng was doing, we were trying to switch the parent interface to promiscuous mode, failing, and then bailing out:

# ngctl msg vtnet0: setpromisc 1
ngctl: send msg: Operation not supported

Just commenting out that line in jng seemed to be sufficient, though I don't know
what side effects that might have. My jails all came up ok after that, and were
at least able to send/recv traffic, ping the jail host, etc.

    306                 # Set promiscuous mode and don't overwrite src addr
    307                 # ngctl msg $iface: setpromisc 1 || return
    308                 ngctl msg $iface: setautosrc 0 || return

I checked that my copy of /usr/sbin/jng wasn't significantly different to the one being shipped in /usr/share/examles/jails.
Comment 1 Kristof Provost freebsd_committer 2021-04-14 15:33:39 UTC
I'm pretty sure this has the same cause as #254343 , which is a vtnet bug, not a jail or bridge bug.
Comment 2 commit-hook freebsd_committer 2022-02-05 15:54:38 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=fc035df8af32d496885e5da26e519ce6a262c9bf

commit fc035df8af32d496885e5da26e519ce6a262c9bf
Author:     Aleksandr Fedorov <afedorov@FreeBSD.org>
AuthorDate: 2022-02-05 15:47:46 +0000
Commit:     Aleksandr Fedorov <afedorov@FreeBSD.org>
CommitDate: 2022-02-05 15:47:46 +0000

    if_vtnet(4): Restore the ability to set promisc mode.

    PR:     254343, 255054
    Reviewed by:    vmaffione (mentor), donner
    Approved by:    vmaffione (mentor), donner
    MFC after:      2 weeks
    Sponsored by:   vstack.com
    Differential Revision:  https://reviews.freebsd.org/D30639

 sys/dev/virtio/network/if_vtnet.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
Comment 3 commit-hook freebsd_committer 2022-02-23 11:10:01 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=009a56b2e416cf32b28be405876ab38bd7544d98

commit 009a56b2e416cf32b28be405876ab38bd7544d98
Author:     Aleksandr Fedorov <afedorov@FreeBSD.org>
AuthorDate: 2022-02-05 15:47:46 +0000
Commit:     Aleksandr Fedorov <afedorov@FreeBSD.org>
CommitDate: 2022-02-23 11:08:24 +0000

    if_vtnet(4): Restore the ability to set promisc mode.

    PR:     254343, 255054
    Reviewed by:    vmaffione (mentor), donner
    Approved by:    vmaffione (mentor), donner
    MFC after:      2 weeks
    Sponsored by:   vstack.com
    Differential Revision:  https://reviews.freebsd.org/D30639

    (cherry picked from commit fc035df8af32d496885e5da26e519ce6a262c9bf)

 sys/dev/virtio/network/if_vtnet.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)