Author: fapeeler
Date: Thu Jan 29 21:32:49 2015
New Revision: 1655865
URL: http://svn.apache.org/r1655865
Log:
VCL-16
discovered and fixed and issue with reinstall.
The add_user_accounts routine was not adding user accounts for reinstalls. The
routine will only skip users if there is
an entry in the reservationaccounts table and if the state is servermodified.
All other states will attempt to add the account
Modified:
vcl/trunk/managementnode/lib/VCL/Module/OS.pm
Modified: vcl/trunk/managementnode/lib/VCL/Module/OS.pm
URL:
http://svn.apache.org/viewvc/vcl/trunk/managementnode/lib/VCL/Module/OS.pm?rev=1655865&r1=1655864&r2=1655865&view=diff
==============================================================================
--- vcl/trunk/managementnode/lib/VCL/Module/OS.pm (original)
+++ vcl/trunk/managementnode/lib/VCL/Module/OS.pm Thu Jan 29 21:32:49 2015
@@ -220,17 +220,10 @@ sub add_user_accounts {
my $password;
# Check if entry needs to be added to the useraccounts table
- if (defined($reservation_accounts->{$user_id})) {
- # Entry already exists in useraccounts table, assume
everything is correct
- notify($ERRORS{'DEBUG'}, 0, "entry already exists in
useraccounts table for $username (ID: $user_id)");
-
- # This is normal, user should exist unless state is
reinstall
- # If reinstall, proceed to try to create the user
- # Otherwise, proceed to next user
- if ($request_state_name !~ /(reinstall)/) {
- next RESERVATION_USER;
- }
- $password = $reservation_accounts->{$user_id}{password};
+ if (defined($reservation_accounts->{$user_id}) &&
($request_state_name =~ /servermodified/)) {
+ # Entry already exists in useraccounts table and is
servermodified, assume everything is correct skip to next user
+ notify($ERRORS{'DEBUG'}, 0, "entry already exists in
useraccounts table for $username (ID: $user_id) and request_state_name =
$request_state_name");
+ next RESERVATION_USER;
}
else {
notify($ERRORS{'DEBUG'}, 0, "entry does not already
exist in useraccounts table for $username (ID: $user_id)");