Rename housekeeping expiry task to be expire

This commit is contained in:
Oliver Gorwits
2014-03-11 21:49:39 +00:00
parent 47d712490e
commit ac97d92ef1
10 changed files with 25 additions and 16 deletions

View File

@@ -11,6 +11,7 @@
* Use daterange for IP Subnets (same as IP Inventory) * Use daterange for IP Subnets (same as IP Inventory)
* Run daemons as target binary's owning user (supports run control) * Run daemons as target binary's owning user (supports run control)
* Clean up library path fiddling across all scripts * Clean up library path fiddling across all scripts
* Rename housekeeping expiry task to be expire
[BUG FIXES] [BUG FIXES]

View File

@@ -50,6 +50,10 @@ setting('plugins')->{DBIC}->{daemon} = {
setting('dns')->{no} ||= ['fe80::/64','169.254.0.0/16']; setting('dns')->{no} ||= ['fe80::/64','169.254.0.0/16'];
setting('dns')->{hosts_file} ||= '/etc/hosts'; setting('dns')->{hosts_file} ||= '/etc/hosts';
# housekeeping expire used to be called expiry
setting('housekeeping')->{expire} ||= setting('housekeeping')->{expiry}
if exists setting('housekeeping')->{expiry};
=head1 NAME =head1 NAME
App::Netdisco - An open source web-based network management tool. App::Netdisco - An open source web-based network management tool.

View File

@@ -23,7 +23,7 @@ sub capacity_for {
my $action_map = { my $action_map = {
Poller => [ Poller => [
qw/discoverall discover arpwalk arpnip macwalk macsuck nbtstat nbtwalk expiry/ qw/discoverall discover arpwalk arpnip macwalk macsuck nbtstat nbtwalk expire/
], ],
Interactive => [qw/location contact portcontrol portname vlan power/], Interactive => [qw/location contact portcontrol portname vlan power/],
}; };

View File

@@ -13,7 +13,7 @@ my $fqdn = hostfqdn || 'localhost';
my $role_map = { my $role_map = {
(map {$_ => 'Poller'} (map {$_ => 'Poller'}
qw/discoverall discover arpwalk arpnip macwalk macsuck nbtstat nbtwalk expiry/), qw/discoverall discover arpwalk arpnip macwalk macsuck nbtstat nbtwalk expire/),
(map {$_ => 'Interactive'} (map {$_ => 'Interactive'}
qw/location contact portcontrol portname vlan power/) qw/location contact portcontrol portname vlan power/)
}; };

View File

@@ -9,7 +9,7 @@ use Role::Tiny;
use namespace::clean; use namespace::clean;
# expire devices and nodes according to config # expire devices and nodes according to config
sub expiry { sub expire {
my ($self, $job) = @_; my ($self, $job) = @_;
if (setting('expire_devices') and setting('expire_devices') > 0) { if (setting('expire_devices') and setting('expire_devices') > 0) {

View File

@@ -15,7 +15,7 @@ my $jobactions = {
arpwalk arpwalk
macwalk macwalk
nbtwalk nbtwalk
expiry expire
/ /
# saveconfigs # saveconfigs
# backup # backup

View File

@@ -898,7 +898,7 @@ hour fields (which accept same types as C<cron> notation). For example:
wday: 'mon-fri' wday: 'mon-fri'
nbtwalk: nbtwalk:
when: '0 8,13,21 * * *' when: '0 8,13,21 * * *'
expiry: expire:
when: '20 23 * * *' when: '20 23 * * *'
Note that the "C<when>" fields default to "all" (i.e. "C<*>") when not Note that the "C<when>" fields default to "all" (i.e. "C<*>") when not

View File

@@ -48,6 +48,10 @@ The Web and Backend daemons will also now drop privilege to the same user and
group as their files on disk. This allows you to symlink the programs as group as their files on disk. This allows you to symlink the programs as
run-control scripts, yet maintain non-root privilege status. run-control scripts, yet maintain non-root privilege status.
The housekeeping task C<expiry> has been renamed to C<expire>. Old
configuration will continue to work, but we recommend you rename this part of
your C<housekeeping> configuration anyway.
=head1 2.023000 =head1 2.023000
=head2 Incompatible Changes =head2 Incompatible Changes
@@ -93,7 +97,7 @@ Add the following to your "C<housekeeping>" configuration in
C<deployment.yml>, to have a nightly check at 11:20pm: C<deployment.yml>, to have a nightly check at 11:20pm:
housekeeping: housekeeping:
expiry: expire:
when: '20 23 * * *' when: '20 23 * * *'
You should also configure one or more of C<expire_devices>, C<expire_nodes>, You should also configure one or more of C<expire_devices>, C<expire_nodes>,

View File

@@ -175,17 +175,17 @@ dns:
#housekeeping: #housekeeping:
# discoverall: # discoverall:
# when: '0 9 * * *' # when: '5 7 * * *'
# arpwalk:
# when:
# min: 30
# macwalk: # macwalk:
# when: # when:
# min: 15 # min: 20
# hour: '*/2' # arpwalk:
# wday: 'mon-fri' # when:
# nbtwalk: # min: 50
# when: '0 8,13,21 * * *' # nbtwalk:
# when: '0 8,13,21 * * *'
# expire:
# when: '20 23 * * *'
# --------------- # ---------------
# DANCER INTERNAL # DANCER INTERNAL

View File

@@ -51,7 +51,7 @@ safe_password_store: true
# min: 50 # min: 50
# nbtwalk: # nbtwalk:
# when: '0 8,13,21 * * *' # when: '0 8,13,21 * * *'
# expiry: # expire:
# when: '20 23 * * *' # when: '20 23 * * *'
# increase the performance of parallel DNS resolution for node # increase the performance of parallel DNS resolution for node