Merge 1.4_expected_state.

This commit is contained in:
Eric Gable
2013-11-27 12:45:16 -08:00
4 changed files with 11 additions and 29 deletions
+4
View File
@@ -1,5 +1,9 @@
WALinuxAgent Changelog
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? ????, WALinuxAgent 1.4.1
. Remove reference to VM shutdown on "stopped" state. This behavior was an
artifact from pre-GA IaaS VMs on Windows Azure.
23 Aug 2013, WALinuxAgent 1.4.0
. Add support for bootstrapping VMM agent for Linux when running in SCVMM
2012R2 environments (see README)
+4 -11
View File
@@ -172,17 +172,10 @@ Configuration File Options:
Role.StateConsumer:
Type: String Default: None
If a path to an executable program is specified, it is invoked at two events:
* When the waagent has provisioned the image and the "Ready" state is
about to be reported to the Fabric. The argument specified to the program will
be "Ready". The waagent will not wait for the program to return before
continuing.
* When the waagent has received a shutdown request from the Fabric
and is about to shutdown the VM. The argument specified to the program will be
"Shutdown". waagent will wait for the program to return before initiating the
shutdown process.
If a path to an executable program is specified, it is invoked when waagent has
provisioned the image and the "Ready" state is about to be reported to the
Fabric. The argument specified to the program will be "Ready". The agent will
not wait for the program to return before continuing.
Role.ConfigurationConsumer:
Type: String Default: None
+1 -3
View File
@@ -2,9 +2,7 @@
# Windows Azure Linux Agent Configuration
#
# Specified program is invoked with "Ready" or "Shutdown".
# Shutdown will be initiated only after the program returns. Windows Azure will
# power off the VM if shutdown is not completed within ?? minutes.
# Specified program is invoked with "Ready"
Role.StateConsumer=None
# Specified program is invoked with XML file argument specifying role
+2 -15
View File
@@ -1088,7 +1088,6 @@ class GoalState(Util):
# There is only one Role for VM images.
#
# Of primary interest is:
# Machine/ExpectedState -- this is how shutdown is requested
# LBProbePorts -- an http server needs to run here
# We also note Container/ContainerID and RoleInstance/InstanceId to form the health report.
# And of course, Incarnation
@@ -1101,7 +1100,7 @@ class GoalState(Util):
def reinitialize(self):
self.Incarnation = None # integer
self.ExpectedState = None # "Started" or "Stopped"
self.ExpectedState = None # "Started"
self.HostingEnvironmentConfigUrl = None
self.HostingEnvironmentConfigXml = None
self.HostingEnvironmentConfig = None
@@ -2082,16 +2081,6 @@ class Agent(Util):
Children.append(subprocess.Popen([program, "Ready"]))
program = None
if goalState.ExpectedState == "Stopped":
program = Config.get("Role.StateConsumer")
if program != None:
Run(program + " Shutdown")
self.EnvMonitor.ShutdownService()
self.LoadBalancerProbeServer_Shutdown()
command = '/sbin/shutdown -hP now'
Run(command)
return
sleepToReduceAccessDenied = 3
time.sleep(sleepToReduceAccessDenied)
if provisionError != None:
@@ -2311,9 +2300,7 @@ WaagentConf = """\
# Windows Azure Linux Agent Configuration
#
Role.StateConsumer=None # Specified program is invoked with "Ready" or "Shutdown".
# Shutdown will be initiated only after the program returns. Windows Azure will
# power off the VM if shutdown is not completed within ?? minutes.
Role.StateConsumer=None # Specified program is invoked with "Ready".
Role.ConfigurationConsumer=None # Specified program is invoked with XML file argument specifying role configuration.
Role.TopologyConsumer=None # Specified program is invoked with XML file argument specifying role topology.