Skip to content

Commit

Permalink
ncm-network: nmstate: bond master does not take care of slaves
Browse files Browse the repository at this point in the history
  • Loading branch information
stdweird authored and jrha committed Sep 5, 2024
1 parent b9ed5b1 commit d69d3b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ncm-network/src/main/perl/network.pm
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,8 @@ our @EXPORT = qw($FAILED_SUFFIX

# list of constants to allow inheritance via $self->CONSTANTNAME
use constant IFCFG_DIR => "/etc/sysconfig/network-scripts";
use constant BOND_MASTER_STARTS_SLAVES => 1;


sub backup_dir
{
Expand Down Expand Up @@ -1445,7 +1447,7 @@ sub make_ifup
$exifiles->{"$cfg_filename"} == $REMOVE) {
$self->verbose("Not starting $iface scheduled for removal");
} else {
if ($ifaces->{$iface}->{master}) {
if ($self->BOND_MASTER_STARTS_SLAVES && $ifaces->{$iface}->{master}) {
# bonding devices: don't bring the slaves up, only the master
$self->verbose("Found SLAVE interface $iface in ifdown map, ",
"not starting it with ifup; is left for master $ifaces->{$iface}->{master}.");
Expand Down
2 changes: 2 additions & 0 deletions ncm-network/src/main/perl/nmstate.pm
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Readonly my $YTRUE => $EDG::WP4::CCM::TextRender::ELEMENT_CONVERT{yaml_boolean}-
Readonly my $YFALSE => $EDG::WP4::CCM::TextRender::ELEMENT_CONVERT{yaml_boolean}->(0);

use constant IFCFG_DIR => "/etc/nmstate";
use constant BOND_MASTER_STARTS_SLAVES => 0;


sub iface_filename
{
Expand Down

0 comments on commit d69d3b2

Please sign in to comment.