I'm using a set of role parameters that are used by a script that is
run on OnHostInit.

The problem is that when I do a sync-all on that roll, when it
attempts to start the new instance the role parameters aren't
populated. (or can't be retrieved)

It also appears that the parameters are falling back to the role
defaults, instead of the values that are on the existing role that was
getting synced.

If I look at the farm config, I see two roles named the same with the
old role with the check mark.

The old role has been reverted to the role defaults (not what had been
configured on the farm)

and there's no way to query the new roles parameters.

So the only way I see to deal with the situation, is to uncheck the
script before sync-all

sync-all, allow the instance to come up

re-edit the farm, configure the parameter correctly for the farm
again.

add the script back to the scripting tab, run it explicitly on the
farm.

Then if the host goes down, it comes up properly, the params are
available, and it works like normal.

If I sync-all again, without doing the above, it all goes to crap
again.

log of the script run:

2009-06-25T23:01:14-04:00 ec2-174-129-133-17 deployscripts: + PATH=/
usr/local/ruby-enterprise/bin:/usr/local/ruby-enterprise/lib/ruby/gems/
1.8/gems/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/
bin
2009-06-25T23:01:14-04:00 ec2-174-129-133-17 deployscripts: + RUBYLIB=/
usr/local/ruby-enterprise/lib/ruby/1.8
2009-06-25T23:01:14-04:00 ec2-174-129-133-17 deployscripts: + cd /
rails/deployscripts/current
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ . /usr/
local/aws/lib/lib.sh
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++ test -
r /etc/aws/host.conf
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++ . /etc/
aws/host.conf
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
SERVER_ROLE=app
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
USER_ROLE=staging-app
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++ test -
r /etc/aws/farmconfig
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++ . /etc/
aws/farmconfig
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
FARMID=1385
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
PARENT_URL=scalr.net
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
ACCESS_HASH=<omit>
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
BUCKET_NAME=<omit>
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
PARENT_PROTO=http
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++
EC2_REGION=us-east-1
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++
ec2_get_option_val options.cluster_params
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++
OPTION_NAME=options.cluster_params
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++
OPTION_DATA=
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ test -
r /etc/aws/farmconfig
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ . /etc/
aws/farmconfig
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
FARMID=1385
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
PARENT_URL=scalr.net
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
ACCESS_HASH=<omit>
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
BUCKET_NAME=<omit>
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
PARENT_PROTO=http
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
EC2_REGION=us-east-1
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ grep
deployscripts_branch
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ cut '-d
' -f 2
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ tr -d
'"'
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++
ec2_get_local_instance_id
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++++ curl -
s http://169.254.169.254/latest/meta-data/instance-id
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: +++ echo
i-5d476734
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++
IID=i-5d476734
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ '[' -z
options.cluster_params ']'
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ '[' -z
scalr.net ']'
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ '[' -z
http ']'
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ '[' ''
']'
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++
DATA_STR=
2009-06-25T23:01:15-04:00 ec2-174-129-133-17 deployscripts: ++ curl -L
-f -s --insecure http://scalr.net/config_opts.php -F
option=options.cluster_params -F FarmID=1385 -F Hash=<omit> -F
InstanceID=i-5d476734
2009-06-25T23:01:19-04:00 ec2-174-129-133-17 deployscripts: ++ return
0
2009-06-25T23:01:19-04:00 ec2-174-129-133-17 deployscripts: +
DEPLOYSCRIPTS_BRANCH=
2009-06-25T23:01:20-04:00 ec2-174-129-133-17 deployscripts: Failed to
complete user defined boot_finish tasks! Halting instance!
(10.254.107.83/app)

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/scalr-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to