Opened 2 years ago

Last modified 12 days ago

#1001 assigned enhancement

Configure BCCD networking

Reported by: skylar Owned by: skylar
Priority: blocker Milestone: 3.4.0-build_ng
Component: Both Version: 3.4.0
Keywords: Cc:
Blocked By: Blocking:
Estimated Hours: 2 Total Hours: 0

Description

Change bccd-reset-network for systemd

Change History (68)

comment:1 Changed 2 years ago by skylar

  • Milestone changed from 3.4.0 to 3.4.0-build_ng
  • Status changed from new to assigned

comment:2 Changed 2 years ago by skylar

In 5930//cluster/svnroot:

first pass at adding systemd to bccd-reset-network re #1001

comment:3 Changed 2 years ago by skylar

In 5931//cluster/svnroot:

run bccd-dhcp re #1001

comment:4 Changed 2 years ago by skylar

In 5933//cluster/svnroot:

add better debugging re #1001

comment:5 Changed 2 years ago by skylar

In 5934//cluster/svnroot:

fixing typo re #1001

comment:6 Changed 2 years ago by skylar

Current problem: need to get BCCD interface up with an alias for 192.168.3.1

comment:7 Changed 2 years ago by skylar

Need to set INTERFACESv4 in /etc/default/isc-dhcp-server to the BCCD interface the user chooses in the dialog

Last edited 2 years ago by skylar (previous) (diff)

comment:8 Changed 2 years ago by skylar

In 5935//cluster/svnroot:

invoke-rc.d is no more, long live systemd re #1001

comment:9 Changed 2 years ago by skylar

In 5936//cluster/svnroot:

set BCCD interface in /etc/default/isc-dhcp-server re #1001

comment:10 Changed 2 years ago by skylar

seems that bccd-nic-setup is allowing the BCCD NIC to have DHCP

comment:11 Changed 2 years ago by skylar

In 5941//cluster/svnroot:

removing unused conf_nics function re #1001

comment:12 Changed 2 years ago by skylar

In 5942//cluster/svnroot:

seems we need to keep :1 now re #950, #1001

comment:13 Changed 2 years ago by skylar

comment:14 Changed 2 years ago by skylar

In 5944//cluster/svnroot:

use iproute2 even for BCCD NIC re #1001

comment:15 Changed 2 years ago by skylar

next up: need to have DHCP come up even before bccd-reset-network

comment:16 Changed 2 years ago by skylar

In 5945//cluster/svnroot:

minor typos in bccd-dhcp re #1001

comment:17 Changed 2 years ago by skylar

need to fix bccd-dhcp more, and also make sure that the BCCD NIC comes up before DHCP

comment:18 Changed 14 months ago by skylar

In 6057//cluster/svnroot:

adding net-tools for (deprecated) ifconfig re #1001

comment:19 Changed 14 months ago by skylar

comment:20 Changed 11 months ago by skylar

/bin/bccd-reset-network or Bccd.pm produces a /etc/network/interfaces file with multiple configuration per interface, which breaks the new systemd networking unit

bccd@bigfe:~$ cat /etc/network/interfaces
iface lo inet loopback

iface eth1 inet dhcp

iface eth1 inet static
        address 192.168.3.1
        netmask 255.255.255.0
        broadcast 192.168.3.255
iface eth0 inet dhcp

iface eth0 inet static
        address 10.0.3.15
        netmask 255.255.255.0
auto eth0 eth1 lo

comment:21 Changed 11 months ago by skylar

In 6096//cluster/svnroot:

fix logic error w/ testmode re #1001

comment:22 Changed 11 months ago by skylar

In 6097//cluster/svnroot:

improving logging re #1001

comment:23 Changed 11 months ago by skylar

error appears to be around line 2783 in Bccd.pm and use of $temp variable

comment:24 Changed 10 months ago by skylar

In 6105//cluster/svnroot:

enable networkd on bccd package install re #1001

comment:25 Changed 10 months ago by skylar

In 6106//cluster/svnroot:

activate systemd networking re #1001

comment:26 Changed 10 months ago by skylar

in /etc/NetworkManager/NetworkManager.conf, try setting managed=true

comment:27 Changed 10 months ago by skylar

In 6107//cluster/svnroot:

divert NetworkManager?.conf to manage all wired connections re #1001

comment:28 Changed 10 months ago by skylar

In 6108//cluster/svnroot:

match parens re #1001,#1008

comment:29 Changed 10 months ago by skylar

Brainstorming for live mode:

  1. Via custom systemd unit, run dhclient -cf /etc/dhcp/dhclient.conf-bccd on each interface to discover other BCCD systems
    • If no other BCCD are found, then prompt and start DHCP on user-provided interface.
    • If a BCCD DHCP server responds, rename /etc/dhcp/dhclient.conf-bccd to /etc/dhcp/dhclient.conf
  2. Allow systemd-networkd to take over

comment:30 Changed 10 months ago by skylar

command to add IP address to interface:

ip addr add 192.168.3.1/24 dev eth1

sample bccd_net.conf

subnet 192.168.3.0 netmask 255.255.255.0 {
    authoritative;
    option subnet-mask 255.255.255.0;
    option broadcast-address 192.168.3.255;
    pool {
        range 192.168.3.10 192.168.3.100;
        deny members of "ignored-nodes";
        allow members of "bccd-nodes";
    }
}

comment:31 Changed 10 months ago by skylar

In 6112//cluster/svnroot:

install bridge-utils re #1001

comment:32 Changed 10 months ago by skylar

In 6114//cluster/svnroot:

setup script for head node networking re #1001

comment:33 Changed 10 months ago by skylar

next up - figure out how to get NetworkManager on non-head nodes to use dhclient.conf-bccd

comment:34 Changed 9 months ago by skylar

In 6115//cluster/svnroot:

node000 systemd networking configs re #1001

comment:35 Changed 9 months ago by skylar

comment:36 Changed 9 months ago by skylar

can we maybe have static files that are universal enough not to need bccd-setup-head-node?

comment:37 Changed 9 months ago by skylar

In 6117//cluster/svnroot:

use systemd-resolved re #1001

comment:38 Changed 9 months ago by skylar

if bridging ends up being too complicated, this will work for a single interface:

bccd@bigfe:/etc/dhcp$ cat /etc/systemd/network/eth1.network 
[Match]
Name=eth1

[Network]
DHCP=yes
Address=192.168.3.1/24

comment:39 Changed 9 months ago by skylar

In 6118//cluster/svnroot:

template re #1001

comment:40 Changed 8 months ago by skylar

In 6119//cluster/svnroot:

manual resolv.conf management for chroot re #1001

comment:41 Changed 8 months ago by skylar

In 6120//cluster/svnroot:

work in chroot re #1001

comment:42 Changed 8 months ago by skylar

In 6121//cluster/svnroot:

debug statements re #1001

comment:43 Changed 8 months ago by skylar

comment:44 Changed 8 months ago by skylar

In 6123//cluster/svnroot:

if statements for clarity re #1001

comment:45 Changed 8 months ago by skylar

In 6124//cluster/svnroot:

might be able to install apt packages before bccd to avoid resolv.conf problems re #1001

comment:46 Changed 5 months ago by skylar

whither from here:

  1. Learn some more about systemd
  2. Learn some more about Linux networking internals

comment:47 Changed 4 months ago by skylar

current thoughts:

Re-write bccd-reset-network in terms of systemd units, which correspond to the different network stages BCCD has:

  1. Live mode, provide BCCD-only addresses on any interface
  2. Liberated mode, provide BCCD-only addresses on any interface with optional home directory sharing
  3. Liberated mode, with diskless/PXE on a single interface that the user selects

Units not in use should be masked

comment:48 Changed 4 months ago by skylar

Things remaining to figure out:

  1. How do we start DHCP with the special BCCD options?
  2. How do we display networking information in a way that is useful to users?

comment:49 Changed 4 months ago by skylar

comment:50 Changed 4 months ago by skylar

Note to self: systemctl restart networking is not sufficient in this Brave New World. systemctl restart systemd-networkd is the new paradigm, despite its redundancies

comment:52 Changed 4 months ago by skylar

todo for next time:

  1. Tweak build to move /etc/network/interfaces out of the way
  2. Figure out how to mimic the set_dhcp_stance function (parses dhclient lease files to determine network information)
  3. Write new bccd-reset-network to exercise dhclient manually to figure out which systemd templates to write out

comment:53 Changed 4 months ago by skylar

figured out how to have both a static and DHCP-assigned address on one interface with systemd, along with running a DHCP server on the interface

also figured out how to lock a client to a BCCD DHCP server using vendor-class-identifier (requires configs on both client and server), and that we still need to send bccd-identifier from the DHCP server since apparently vendor-class-identifier is only intended to go from the client to the server (DHCP server will not send it even if it is set)

wiki updated: http://bccd.net/wiki/index.php/Talk:Network_Environment

comment:54 Changed 4 months ago by skylar

In 6126//cluster/svnroot:

/etc/network/interfaces should be diverted to allow for systemd-networkd configuration re #1001

comment:55 Changed 4 months ago by skylar

In 6127//cluster/svnroot:

first pass at auto-generating networking configs for systemd re #1001

comment:56 Changed 3 months ago by skylar

In 6135//cluster/svnroot:

interim commit re #1001

comment:57 Changed 3 months ago by skylar

In 6136//cluster/svnroot:

probably do not need ignored_nodes any longer re #1001

comment:58 Changed 3 months ago by skylar

In 6137//cluster/svnroot:

bccd_net.conf can be static for now re #1001

comment:59 Changed 3 months ago by skylar

In 6138//cluster/svnroot:

restart services, make systemd files re #1001

comment:60 Changed 6 weeks ago by skylar

forgot to rebuild bccd deb, have out-of-date package in latest ISO, rebuild from the beginning and then test

comment:61 Changed 5 weeks ago by skylar

unclear whether VBox DHCP server is working - downloading debian live CD to see if it can pick up an address on bccd-ng0-net

comment:62 Changed 5 weeks ago by skylar

enable DHCP server: VBoxManage dhcpserver add --netname bccd-ng0-int --netmask 255.255.255.0 --lowerip 192.168.4.50 --upperip 192.168.4.60 --enable --ip 192.168.4.20

docs updated: http://bccd.net/wiki/index.php/VirtualBoxTestEnvironment#CLI

Last edited 5 weeks ago by skylar (previous) (diff)

comment:63 Changed 5 weeks ago by skylar

client requests the IP address that the VirtualBox DHCP server hands out, but doesn't seem to do a DHCPDISCOVER:

Aug 16 03:57:36 bigfe dhcpd[2503]: DHCPREQUEST for 192.168.4.51 (192.168.4.20) from 08:00:27:7f:fb:f0 via eth1: wrong network.
Aug 16 03:57:36 bigfe dhcpd[2503]: DHCPNAK on 192.168.4.51 to 08:00:27:7f:fb:f0 via eth1
Aug 16 03:57:41 bigfe dhcpd[2503]: DHCPREQUEST for 192.168.4.51 (192.168.4.20) from 08:00:27:7f:fb:f0 via eth1: wrong network.
Aug 16 03:57:41 bigfe dhcpd[2503]: DHCPNAK on 192.168.4.51 to 08:00:27:7f:fb:f0 via eth1
Last edited 5 weeks ago by skylar (previous) (diff)

comment:64 Changed 4 weeks ago by skylar

In 6139//cluster/svnroot:

dhclient.conf-bccd should send vendor-class-identifier, but require bccd-identifier (from server) re #1001

comment:65 Changed 4 weeks ago by skylar

For some reason, changing send bccd-identifier = "bccd-client"; to send vendor-class-identifier = "bccd-client"; in dhclient.conf-bcccd causes the client to end up with an IP address from the network DHCP server, not BCCD.

Leaving it as bccd-identifier keeps the client from picking up an address from the network server (might be something wrong with the

comment:66 Changed 4 weeks ago by skylar

In 6140//cluster/svnroot:

match either vendor-class-identifier or bccd-identifier on server re #1001

comment:67 Changed 12 days ago by skylar

Need to set vendor-class-identifier in client configs

confirmed that IP address is obtained properly by manually passing configs:

dhclient -cf /etc/dhcp/dhclient.conf-bccd -d eth0

comment:68 Changed 12 days ago by skylar

In 6141//cluster/svnroot:

trailing whitespace re #1001

Note: See TracTickets for help on using tickets.