Ask Your Question
1

freebsd ipfw status is always 'stopped'

asked 2013-05-13 08:20:05 -0500

dvish gravatar image

updated 2013-05-13 12:17:10 -0500

Stefan gravatar image

Hi

I use FreeBSD9.1 and want to make restart ipfw when configuration is changed. But now I get ipfw restarting any time when client call puppetmaster. Even if configuration isn't changed.

  message: "ensure changed 'stopped' to 'running'"

class ipfw {
  file { "/etc/fw/":
    ensure => "directory",
    owner  => "root",
    group  => "wheel",
    mode   => 0750,
  }

  file { "/etc/fw/rc.ipfw.rules":
    notify => Service["ipfw"],
    owner  => "root",
    group  => "wheel",
    mode   => 0440,
    source => "puppet://$puppetserver/modules/ipfw/etc/fw/rc.ipfw.rules",
  }

  service { "ipfw":
    enable    => "true",
    ensure    => "running",
    subscribe => File['/etc/fw/rc.ipfw.rules']
  }
}

How puppet can understand that ipfw is already running? If ... (more)

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-05-13 12:13:05 -0500

Stefan gravatar image

updated 2013-05-14 16:00:56 -0500

can you please run puppet agent with the --debug flag? This way we can both see which provider puppet uses and which command it runs.

I guess puppet will execute /etc/rc.d/ipfw onestatus to get the current status (running/not running). Can you please run the above command and post the output and the exitcode?

Update: Puppet will only be able to correctly ensure that the service is running, if it is possible to get the current state. As it turns out the default behaviour of puppet is to run initscript onestatus but apperently the ipfw does not ... (more)

edit flag offensive delete link more

Comments

OK. It works this way. Thanks!

dvish gravatar imagedvish ( 2013-05-15 05:09:26 -0500 )edit
0

answered 2013-05-13 13:10:35 -0500

dvish gravatar image

updated 2013-05-13 16:23:45 -0500

-- output omitted --

May 13 20:31:46 dnpmisra02 puppet-agent[24705]: Loaded state in 0.00 seconds
May 13 20:31:46 dnpmisra02 puppet-agent[24705]: (/Stage[main]/Ipfw/Service[ipfw]/subscribe) subscribes to File[/etc/fw/rc.ipfw.rules]
May 13 20:31:46 dnpmisra02 puppet-agent[24705]: (/Stage[main]/Ipfw/File[/etc/fw/rc.ipfw.rules]/notify) subscribes to Service[ipfw]
May 13 20:31:46 dnpmisra02 puppet-agent[24705]: (/Stage[main]/Ipfw/File[/etc/fw/rc.ipfw.rules]) Autorequiring File[/etc/fw/]
May 13 20:31:46 dnpmisra02 puppet-agent[24705]: (/Schedule[daily]) Skipping device resources because running on a host
May ...
(more)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2013-05-13 08:20:05 -0500

Seen: 449 times

Last updated: May 14 '13