This keeps whitespace out of the condor instance name when handed to the deltacloud gahp in condor.
This seems to be the only place that this escaping is needed. The other areas seem to work fine with the spaces. Note we may need more scrubbing yet, this is just the most obvious thing to look for. Signed-off-by: Ian Main <[email protected]> --- src/app/util/condormatic.rb | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/src/app/util/condormatic.rb b/src/app/util/condormatic.rb index 6437c2c..d39844d 100644 --- a/src/app/util/condormatic.rb +++ b/src/app/util/condormatic.rb @@ -39,7 +39,10 @@ def condormatic_instance_create(task) pipe.puts "executable = #{job_name}\n" Rails.logger.info "executable = #{job_name}\n" - resource = "grid_resource = dcloud $$(provider_url) $$(username) $$(password) $$(image_key) #{instance.name}" + # FIXME: We should check and see what characters are valid here and scrub anything + # unusual from condor jobs. + esc_inst_name = instance.name.gsub(' ', '\ ') + resource = "grid_resource = dcloud $$(provider_url) $$(username) $$(password) $$(image_key) #{esc_inst_name}" if realm != nil resource += " $$(realm_key)" else -- 1.7.2.3 _______________________________________________ deltacloud-devel mailing list [email protected] https://fedorahosted.org/mailman/listinfo/deltacloud-devel
