[PATCH aeolus] BZ#723351 Added configurable param for condor timeout
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/app/util/condormatic.rb | 6 ++++++
src/config/condor.yml | 12 ++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
create mode 100644 src/config/condor.yml
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index b52ff46..82815b4 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -29,6 +29,7 @@ class Possible
@hwp = hwp
@provider_image = provider_image
@realm = realm
+ @condor_config = YAML.load_file("#{RAILS_ROOT}/config/condor.yml")
end
end
@@ -82,6 +83,10 @@ def condormatic_instance_create(task)
instance.provider_account = found.account
+ # Determine request timeout from /config/condor.yml
+ provider_type_codename = @account.provider.provider_type.codename
+ request_timeout = @condor_config[:request_timeout].key?(provider_type_codename) ? @condor_config[:request_timeout][provider_type_codename] : @condor_config[:request_timeout]["default"]
+
# I use the 2>&1 to get stderr and stdout together because popen3 does not
# support the ability to get the exit value of the command in ruby 1.8.
pipe = IO.popen("condor_submit 2>&1", "w+")
@@ -93,6 +98,7 @@ def condormatic_instance_create(task)
pipe_and_log(pipe, "DeltacloudUsername = #{found.account.credentials_hash['username']}\n")
pipe_and_log(pipe, "DeltacloudPasswordFile = #{pwfilename}")
pipe_and_log(pipe, "DeltacloudImageId = #{found.provider_image.target_identifier}\n")
+ pipe_and_log(pipe, "DeltacloudRetryTimeout = #{request_timeout}\n")
pipe_and_log(pipe,
"DeltacloudHardwareProfile = #{found.hwp.external_key}\n")
pipe_and_log(pipe,
diff --git a/src/config/condor.yml b/src/config/condor.yml
new file mode 100644
index 0000000..52e15d6
--- /dev/null
+++ b/src/config/condor.yml
@@ -0,0 +1,12 @@
+# Condor Request Timeout (in seconds)
+:request_timeout:
+ default: 180
+ # Uncomment to override default request timeout for paritular provider type
+ # mock 180
+ # gogrid: 180
+ # rackspace: 180
+ # opennebula: 180
+ # ec2: 180
+ # condorcloud: 180
+ # rhevm: 180
+ # vsphere: 180
--
1.7.4
12 years, 4 months
[PATCH aeolus] BZ#723351 Added configurable param for condor timeout
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/app/util/condormatic.rb | 2 ++
src/config/condor.yml | 1 +
2 files changed, 3 insertions(+), 0 deletions(-)
create mode 100644 src/config/condor.yml
diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb
index b52ff46..45aa4bd 100644
--- a/src/app/util/condormatic.rb
+++ b/src/app/util/condormatic.rb
@@ -29,6 +29,7 @@ class Possible
@hwp = hwp
@provider_image = provider_image
@realm = realm
+ @condor_config = YAML.load_file("#{RAILS_ROOT}/config/condor.yml")
end
end
@@ -93,6 +94,7 @@ def condormatic_instance_create(task)
pipe_and_log(pipe, "DeltacloudUsername = #{found.account.credentials_hash['username']}\n")
pipe_and_log(pipe, "DeltacloudPasswordFile = #{pwfilename}")
pipe_and_log(pipe, "DeltacloudImageId = #{found.provider_image.target_identifier}\n")
+ pipe_and_log(pipe, "DeltacloudRetryTimeout = #{@condor_config[:request_timeout]}\n")
pipe_and_log(pipe,
"DeltacloudHardwareProfile = #{found.hwp.external_key}\n")
pipe_and_log(pipe,
diff --git a/src/config/condor.yml b/src/config/condor.yml
new file mode 100644
index 0000000..9db1e5b
--- /dev/null
+++ b/src/config/condor.yml
@@ -0,0 +1 @@
+:request_timeout: 180
--
1.7.4
12 years, 4 months
/var/lib/dbus/machine_id, imagefactory, and matahari
by Steven Dake
Currently most linux distributions that use dbus store a UUID in
/var/lib/dbus/machine_id. In our pacemaker-cloud work test tools, we
must manipulate this file via oz image creation to match a value we know
about.
Q1. Is this file freshly created on each image creation/cloning process?
If not, it should be, because Matahari uses this information to uniquely
identify a host. If it is copied exactly to each new image, that
creates a problem (all hosts appear the same to matahari).
Q2. If/when it is created by image factory, will it be stored in a
database or other storage medium?
In pacemaker-cloud we need to have a mapping from image->internal id id
so that we know which VM maps to which deployable HA configuration.
If we wait on this point until after our 1.0 release, we could end up
with a bunch of images in the field that have either the same machine id
or are not mapped in any way that allows us to provide HA functionality.
Regards
-steve
12 years, 4 months
Announcing Pacemaker Cloud 0.4.1 - Available now for download!
by Steven Dake
Angus and I announced a project to apply high availability best known
practice to the field of cloud computing in late March 2011. We reuse
the policy engine of Pacemaker. Our first tarball is available today
containing a functional prototype demonstrating these best known practices.
Today the software supports a deployable/assembly model. Assemblies
represent a virtual machine and deployables represent a collection of
virtual machines. Resources within a virtual machine can be monitored
for failure and recovered. Assemblies and deployables are also
monitored for failure and recovered.
Currently the significant limitation with the software is that it
operates single node. As a result it is not suitable for deployment
today. We plan to address this in the future by integrating with other
cloud infrastructure systems such as Aeolus (developer ml on CC list).
The software will be available in Fedora 16 for all to evaluate that run
Fedora. Your feedback is greatly appreciated. To provide feedback,
join the mailing list:
http://oss.clusterlabs.org/mailman/listinfo/pcmk-cloud/
If you have interest in developing for cloud environments around the
topic of high availability, please feel free to download our git repo
and submit patches. We also are interested in user feedback!
To get the software, check out:
http://pacemaker-cloud.org/
12 years, 4 months
Out today
by Simon Harris
It was bound to happen. New job + moving house * winter ^ kids = sick. Will sleep it off and hopefully be back tomorrow. Will still check email periodically.
12 years, 4 months
[PATCH conductor] #725680 - Remove dummy text from statistics
by Matt Wagner
On the pools#index page, the scoreboard had hardcoded values of 0 for updates, and for the quota. This patch removes that information.
This is intended for 0.3.x only. It should not be applied to master, where we hope to eventually implement those features.
12 years, 4 months
vSphere guest IP bug status
by Matt Wagner
Hi,
I was asked this afternoon to look into the bug where some instances
(particularly on vSphere, and possibly on other providers) reported a
MAC address instead of an IP. There are a few things going on and I
wanted to update everybody on the status. We're going to need to wrap
this up tomorrow.
The problem is that before the instance has obtained an IP, all that's
available is its MAC address. This MAC gets reported over deltacloud as
the IP address, so EventLog has this as the "IP" and dbomatic picks it
up and dutifully stores it in the database. But there is no Condor event
triggered on the change of an IP; it's not considered a state change.
Ergo, we never notice that the MAC has been replaced by an IP.
Worse, after spending a bit trying to just read the data out of Condor,
we discovered that Condor is never updated with the IP at all in these
cases. Even long after deltacloud starts reporting an IP and Condor
polls for status, the MAC stores as an IP in Condor is never updated.
It looks like deltacloud will be updated tomorrow to split out the
'address' tag to have type="mac" and "type="ipv4", but this won't fully
solve our problem -- we'll be able to tell the difference between MACs
and IPs now, but we'll still have the problem of not getting an IP in
Conductor.
Short-term, the fix we identified is to go off to deltacloud any time we
display IP and obtain the information there. It should work to define
public_addresses and private_addresses in instance.rb, and insert calls
to Deltacloud there. (As a slight optimization, we could write the
values to the database here, and use those if the values were present,
so we don't have to go out to the network each time.) This isn't ideal
in the long-term, since it's fairly slow, but it's the best we're able
to do on short notice.
Unfortunately I've got to head out for the night now, so I can't take
care of this. I think the task will be slightly complicated by trying to
find the right instance on the API-side, since vSphere instances (that
will be reported over the API) have crazy UUID-derived names. I have a
sneaking suspicion you'll also have to go out to Image Warehouse to get
the image or build UUID, and then use that to find the matching instance
in deltacloud. From there, though, it should be a simple matter of
grabbing the IP, possibly updating it in the database, and then
returning it. It'll just take queries to a couple of external services.
Is there any way someone not in UTC-5 could pick this up in the morning,
to try to get a fix out? I'm told it's the last bug blocking us from
releasing. And I'm afraid I've got to head out for the night.
-- Matt
12 years, 4 months