[PATCH configure] BZ 803745 - Warn credentials are incorrect if authentication with RHEV fails when checking export type
Richard Su
rwsu at redhat.com
Mon Mar 19 17:51:43 UTC 2012
https://bugzilla.redhat.com/show_bug.cgi?id=803745
If credentials are incorrect, it is currently hidden behind an error message indicating the export path could not be found.
---
.../parser/functions/rhevm_validate_export_type.rb | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/recipes/aeolus/lib/puppet/parser/functions/rhevm_validate_export_type.rb b/recipes/aeolus/lib/puppet/parser/functions/rhevm_validate_export_type.rb
index 73dd282..6aaad0c 100644
--- a/recipes/aeolus/lib/puppet/parser/functions/rhevm_validate_export_type.rb
+++ b/recipes/aeolus/lib/puppet/parser/functions/rhevm_validate_export_type.rb
@@ -18,6 +18,12 @@ ENDDOC
curl.http_get
result_body = curl.body_str.to_s
+ if result_body.index("HTTP authentication")
+ raise Puppet::ParseError, "Unable to authenticate with RHEV. Please check\
+ deltacloud_username and deltacloud_password in /etc/aeolus-configure/nodes/r\
+hevm_configure."
+ end
+
storagedomains = Nokogiri::XML(result_body)
found = storagedomains.xpath("/storage_domains/storage_domain[type=\"export\"] and /storage_domains/storage_domain/storage[path=\"#{args[4]}\"]")
--
1.7.7.6
More information about the aeolus-devel
mailing list