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

VirtualIP address not being overwritten on change #17

Closed
petems opened this issue Feb 12, 2014 · 1 comment
Closed

VirtualIP address not being overwritten on change #17

petems opened this issue Feb 12, 2014 · 1 comment

Comments

@petems
Copy link
Member

petems commented Feb 12, 2014

Just noticed this when I was testing some Vagrant stuff and changed the virtual address:

keepalived::vrrp::instance { 'VI_50':
    interface         => 'eth1',
    state             => 'MASTER',
    virtual_router_id => '50',
    priority          => '101',
    auth_type         => 'PASS',
    auth_pass         => 'secret',
    virtual_ipaddress => '10.0.0.1/29',
  }

change and run again:

keepalived::vrrp::instance { 'VI_50':
    interface         => 'eth1',
    state             => 'MASTER',
    virtual_router_id => '50',
    priority          => '101',
    auth_type         => 'PASS',
    auth_pass         => 'secret',
    virtual_ipaddress => '10.0.0.2/29',
  }

File stays the same:
/etc/keepalived/keepalived.conf

# Managed by Puppet
vrrp_instance VI_50 {
  interface                 eth1
  state                     MASTER
  virtual_router_id         50
  priority                  101

  authentication {
    auth_type PASS
    auth_pass secret
  }

  virtual_ipaddress {
    10.0.0.1/29 dev eth1
  }

}
@arioch
Copy link
Contributor

arioch commented Feb 13, 2014

When I use your aforementioned example I end up with the following error:

Detail: undefined method `each' for "10.0.0.1/29":String

To fix this make $virtual_ipaddress an array instead of a string:

keepalived::vrrp::instance { 'VI_50':
    ...
    virtual_ipaddress => ['10.0.0.1/29'],
  }

That way it works flawlessly on my vagrant box.

@arioch arioch closed this as completed Feb 13, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants