Merge pull request #249 from ClusterLabs/anvil-tools-dev
* Added variables to record when pacemaker and DRBD are configured.
This commit is contained in:
commit
f6b23de2eb
@ -569,6 +569,7 @@ resource #!variable!server!# {
|
||||
}
|
||||
net {
|
||||
protocol C;
|
||||
verify-alg md5;
|
||||
fencing resource-and-stonith;
|
||||
}
|
||||
}
|
||||
@ -801,6 +802,7 @@ sys::manage::firewall = 1
|
||||
}
|
||||
net {
|
||||
protocol #!variable!protocol!#;
|
||||
verify-alg md5;
|
||||
fencing #!variable!fencing!#;
|
||||
}
|
||||
}
|
||||
@ -829,6 +831,7 @@ resource #!variable!server!# {
|
||||
}
|
||||
net {
|
||||
protocol #!variable!protocol!#;
|
||||
verify-alg md5;
|
||||
fencing #!variable!fencing!#;
|
||||
}
|
||||
}
|
||||
@ -2998,6 +3001,9 @@ If you are comfortable that the target has changed for a known reason, you can s
|
||||
<key name="striker_0292">Stay Off</key>
|
||||
<key name="striker_0293">This is the command used to provision the referenced server.</key>
|
||||
<key name="striker_0294">This indicates if a Striker's DB is available to be used.</key>
|
||||
<key name="striker_0295">This indicates that this node has had pacemaker configured.</key>
|
||||
<key name="striker_0296">This indicates that this node or DR host has had base DRBD configured.</key>
|
||||
<key name="striker_0297">This indicates that this node or DR host has completed all tasks needed to be a full member of the Anvil!.</key>
|
||||
|
||||
<!-- These are generally units and appended to numbers -->
|
||||
<key name="suffix_0001">#!variable!number!#/sec</key>
|
||||
|
@ -68,6 +68,18 @@ configure_drbd($anvil);
|
||||
|
||||
update_progress($anvil, 100, "job_0128");
|
||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, key => "job_0128"});
|
||||
|
||||
# Record that we're done configuring pacemaker.
|
||||
$anvil->Database->insert_or_update_variables({
|
||||
variable_name => "system::all::configured",
|
||||
variable_value => 1,
|
||||
variable_default => "",
|
||||
variable_description => "striker_0297",
|
||||
variable_section => "system",
|
||||
variable_source_uuid => $anvil->data->{sys}{host_uuid},
|
||||
variable_source_table => "hosts",
|
||||
});
|
||||
|
||||
$anvil->nice_exit({exit_code => 0});
|
||||
|
||||
#############################################################################################################
|
||||
@ -97,6 +109,17 @@ sub configure_drbd
|
||||
$anvil->Log->entry({source => $THIS_FILE, line => __LINE__, 'print' => 1, level => 1, key => "job_0128"});
|
||||
}
|
||||
|
||||
# Record that we're done configuring pacemaker.
|
||||
$anvil->Database->insert_or_update_variables({
|
||||
variable_name => "system::drbd::configured",
|
||||
variable_value => 1,
|
||||
variable_default => "",
|
||||
variable_description => "striker_0296",
|
||||
variable_section => "system",
|
||||
variable_source_uuid => $anvil->data->{sys}{host_uuid},
|
||||
variable_source_table => "hosts",
|
||||
});
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -1117,6 +1140,17 @@ sub configure_pacemaker
|
||||
check_corosync($anvil);
|
||||
}
|
||||
|
||||
# Record that we're done configuring pacemaker.
|
||||
$anvil->Database->insert_or_update_variables({
|
||||
variable_name => "system::pacemaker::configured",
|
||||
variable_value => 1,
|
||||
variable_default => "",
|
||||
variable_description => "striker_0295",
|
||||
variable_section => "system",
|
||||
variable_source_uuid => $anvil->data->{sys}{host_uuid},
|
||||
variable_source_table => "hosts",
|
||||
});
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
@ -375,6 +375,8 @@ sub add_repos
|
||||
$anvil->data->{job}{progress} += 5;
|
||||
update_progress($anvil, $anvil->data->{job}{progress}, "job_0028");
|
||||
|
||||
### TODO: Rework this, add $anvil->data->{data}{enterprise_uuid}
|
||||
|
||||
# Add the local repo.
|
||||
my $repo = $anvil->Striker->get_local_repo({debug => 2});
|
||||
$anvil->Log->variables({source => $THIS_FILE, line => __LINE__, level => 2, list => { repo => $repo }});
|
||||
@ -1015,6 +1017,15 @@ sub get_job_details
|
||||
$anvil->nice_exit({exit_code => 3});
|
||||
}
|
||||
|
||||
# Set up all possible variables.
|
||||
$anvil->data->{data}{enterprise_uuid} = "";
|
||||
$anvil->data->{data}{host_ip_address} = "";
|
||||
$anvil->data->{data}{password} = "";
|
||||
$anvil->data->{data}{rh_password} = "";
|
||||
$anvil->data->{data}{rh_user} = "";
|
||||
$anvil->data->{data}{ssh_port} = "";
|
||||
$anvil->data->{data}{type} = "";
|
||||
|
||||
$anvil->data->{jobs}{job_uuid} = $anvil->data->{switches}{'job-uuid'};
|
||||
$anvil->data->{jobs}{job_command} = $return->{job_command};
|
||||
$anvil->data->{jobs}{job_data} = $return->{job_data};
|
||||
|
Loading…
Reference in New Issue
Block a user