Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot avoid the bindnetaddr to be set into /etc/corosync/corosync.conf file #421

Closed
cedef opened this issue Nov 15, 2017 · 2 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@cedef
Copy link
Contributor

cedef commented Nov 15, 2017

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: All
  • Ruby: All
  • Distribution: CentOS 7
  • Module version: 5.1.0

How to reproduce

class { 'corosync':
  authkey           => '/etc/pki/tls/certs/ca-bundle.crt',
  bind_address      => undef,
  unicast_addresses => [
    ['node1_lan', 'node1_btb'],
    ['node2_lan', 'node2_btb'],
  ],
  set_votequorum    => true,
  quorum_members    => [
    ['node1_lan', 'node1_btb'],
    ['node2_lan', 'node2_btb'],
  ],
  cluster_name      => 'cluster_rp',
  enable_secauth    => true,
  rrp_mode          => 'active',
}

What are you seeing

This puppet code results into the following /etc/corosync/corosync.conf snippet:

totem {
...
  interface {
    member {
      memberaddr: node1_lan
    }
    member {
      memberaddr: node2_lan
    }
    ringnumber:  0
    bindnetaddr: 192.168.121.125   # Default value applied => $::ipaddress
    mcastport:   5405
  }
  interface {
    member {
      memberaddr: node1_btb
    }
    member {
      memberaddr: node2_btb
    }
    ringnumber:  1
    bindnetaddr:  # PROBLEM HERE !!
    mcastport:   5405
  }
}

What behaviour did you expect instead

I would expect the bindnetaddr directive to be absent: when absent, corosync daemon behaviour is to bind on all interface where a ring is declared.

Any additional information you'd like to impart

I could attach a patch, would you agreed that either bind_address => undef or bind_address => 'UNSET' would result in no bindnetaddr directive.

@btravouillon
Copy link
Member

Hi @cedef ,

Obviously there is an issue in the corosync.conf file since bindnetaddr is empty for the second interface. Looking at corosync.conf(5), it looks like using $::ipaddress is wrong also.

However, the interface.bindnetaddr is one of the four parameters required, thus I don't believe we can make it an optional parameter.

I will give a deeper look.

Regards,

@btravouillon
Copy link
Member

Looking at corosync.conf(5), it looks like using $::ipaddress is wrong also.

I was looking at https://linux.die.net/man/5/corosync.conf which seems to be an old manpage.

bindnetaddr
This specifies the network address the corosync executive should bind to. For example, if the local interface is 192.168.5.92 with netmask 255.255.255.0, set bindnetaddr to 192.168.5.0. If the local interface is 192.168.5.92 with netmask 255.255.255.192, set bindnetaddr to 192.168.5.64, and so forth.

In the corosync.conf(5) delivered with el7, the use of $::ipaddress is allowed.

bindnetaddr
This specifies the network address the corosync executive should bind to.
bindnetaddr should be an IP address configured on the system, or a network address.

@btravouillon btravouillon self-assigned this Nov 15, 2017
@btravouillon btravouillon added the bug Something isn't working label Nov 15, 2017
btravouillon added a commit to btravouillon/puppet-corosync that referenced this issue Jan 7, 2018
With recent release of corosync, it is recommended to migrate config
file to nodelist because member section is deprecated.

bindnetaddr might also conflicts with nodelist, so we remove bindnetaddr
if nodelist exists.

We rely on the value of set_votequorum to remove member section and
bindnetaddr from corosync.conf. This parameter is tied to quorum_members
in the corosync class.

spec: swap bindnetaddr and ringnumber in corosync.conf

Fix voxpupuli#421 and voxpupuli#422
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants