Bug 1302830
| Summary: | For JBDS integration, CDK Vagrantfiles needs to setup use of env variables for registration plugin | ||
|---|---|---|---|
| Product: | Container Development Kit (CDK) | Reporter: | David Kutálek <dkutalek> |
| Component: | distribution | Assignee: | Lalatendu Mohanty <lmohanty> |
| Status: | ASSIGNED --- | QA Contact: | David Kutálek <dkutalek> |
| Severity: | urgent | Docs Contact: | |
| Priority: | urgent | ||
| Version: | 2.0 | CC: | bgollahe, jgreguske, kanderso, lmohanty, mmalina, optak, prkumar |
| Target Milestone: | beta4 | ||
| Target Release: | 2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | Type: | Bug | |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
David Kutálek
2016-01-28 18:10:56 UTC
On windows, with registration plugin expecting credentials from environment variables, I got question only for password, not for username, it can be problem, need to investigate more. Added the env variables as requested. This should be solved a little bit differently. In expected usage it works fine, but problem is if vagrant-registration is not installed.
Without registration plugin, config.registration doesn't exists, so vagrant commands fails with traceback.
Proposed solution for discussion:
1) encapsulate these command with check for plugin:
if Vagrant.has_plugin?('vagrant-registration')
config.registration.username = ENV['SUB_USERNAME']
config.registration.password = ENV['SUB_PASSWORD']
end
2) print some nice error if plugin is not installed:
# check if plugin is installed on system
unless Vagrant.has_plugin?("vagrant-registration")
raise "vagrant-registration plugin is not installed, run `vagrant plugin install vagrant-registration` to install the plugin."
end
|