Bug 1455002
Summary: | [RFE] Naming Runs Before Parsed Dialog: Dialog Options missing via prov.get_tags or prov.get_option | |||
---|---|---|---|---|
Product: | Red Hat CloudForms Management Engine | Reporter: | Dustin Scott <dscott> | |
Component: | Automate | Assignee: | Greg McCullough <gmccullo> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Shveta <sshveta> | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 5.7.0 | CC: | brant.evans, cpelland, greartes, jcutter, jhardy, mkanoor, obarenbo, simaishi, smallamp, tfitzger | |
Target Milestone: | GA | Keywords: | FutureFeature, TestOnly | |
Target Release: | 5.10.0 | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | 5.10.0.0 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1539750 1539752 (view as bug list) | Environment: | ||
Last Closed: | 2018-06-21 20:38:27 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | CFME Core | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1539750, 1539752 |
Description
Dustin Scott
2017-05-24 01:23:20 UTC
Hey Chris, I'm not trying to be combative here, but I fail to see how this is considerd a 'FutureFeature'/'RFE' when clearly the out-of-the-box tagging with Naming does not work. See additional details above: LOG FROM DEFAULT METHOD (No Modifications). This shows the miq_provision context (see top line): [----] I, [2017-05-23T20:32:28.595727 #2793:a8cb90] INFO -- : Q-task_id([service_template_provision_request_1000000000015]) <AEMethod vmname> Detected vmdb_object_type:<miq_provision> [----] I, [2017-05-23T20:32:28.607959 #2793:a8cb90] INFO -- : Q-task_id([service_template_provision_request_1000000000015]) <AEMethod vmname> vmname: "cfme$n{3}" [----] I, [2017-05-23T20:32:28.641502 #2793:a9b140] INFO -- : Q-task_id([service_template_provision_request_1000000000015]) <AEMethod [/ManageIQ/Cloud/VM/Provisioning/Naming/vmname]> Ending [----] I, [2017-05-23T20:32:28.641879 #2793:a9b140] INFO -- : Q-task_id([service_template_provision_request_1000000000015]) Method exited with rc=MIQ_OK The above was provisioned with tag_0_environment = 'test' set in a service dialog. As the /Cloud/VM/Provisioning/Naming/default should have set: # Returns the first 3 characters of the "environment" tag (or nil) def env_tag env = provision_object.get_tags[:environment] return env[0, 3] unless env.blank? end An out-of-the-box provision, with a service dialog option of tag_0_environment, should yield a vm name of: Expected: testcfme01 Actual: cfme01 As per line 52 of the standard /Infrastructure/VM/Provisioning/Naming/vmname method: env = provision_object.get_tags[:environment] Clearly, this will return nothing every time unless the DialogParser has run, as tags are not available until DialogParser has been run. Just some food for thought here. Thanks! -Dustin Dustin - The simple answer is that the logic you are referring to was designed to work with Lifecycle provisioning before services existed. It needs to be enhanced to work within the service construct without break the existing Lifecycle provisioning implementations. I researched this issue and it is not a straight-forward fix. It still needs to be determined if this can be done in a backwards compatible way and if not what would be the least impactful on existing users. Greg, That does make sense. Thank you for the feedback! I might suggest that we take the example Naming with tags out of our Naming automate method, until we get this RFE put into place, unless this will truly be implemented by 5.7.4. This might take some of the confusion out of the method. Much appreciated! -Dustin Service Catalog Bundles are also affected by this. Part of the fix needs to be that each Catalog Item that is part of a bundle can reference the correct dialog options. For example a Service Catalog Bundle that has two VMware Catalog Items. The VM name needs to include an attribute such as appcode. The Service Dialog has been built with two elements for the appcode with the sequence number in the name (e.g. tag_1_appcode and tag_2_appcode). When the vmname method for the first catalog item is called it should use the value from tag_1_appcode and when called for the second catalog item it should use the value from tag_2_appcode. I am working on get this enhancement code change into 5.8.3 but wanted to note that any fix other then the latest release is going to be partial. Meaning we can expose a method for automate that can be called, but we are not planning on changing the out-of-the-box automate modeling on older versions. Fully implementing the change at the model level would be for the user to decided. New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/1b85d4a1c435a2e28235a3fb65e609b6d372586c commit 1b85d4a1c435a2e28235a3fb65e609b6d372586c Author: Greg McCullough <gmccullo> AuthorDate: Wed Jan 24 17:56:33 2018 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Fri Jan 26 16:46:42 2018 -0500 Refactor Provision task naming to allow for calls from automate. Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1455002 app/models/miq_provision.rb | 13 ++++++++----- app/models/miq_provision/automate.rb | 14 ++++++++++++++ app/models/miq_provision/naming.rb | 8 +------- app/models/miq_provision_request.rb | 6 +++++- 4 files changed, 28 insertions(+), 13 deletions(-) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/0818e1588d8653cec53ca4c7e4dc67de18125854 commit 0818e1588d8653cec53ca4c7e4dc67de18125854 Author: Greg McCullough <gmccullo> AuthorDate: Wed Jan 24 18:10:07 2018 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Fri Jan 26 16:48:09 2018 -0500 Support vm_name enumerations and request description updates https://bugzilla.redhat.com/show_bug.cgi?id=1455002 app/models/miq_provision.rb | 4 +++- spec/models/miq_provision_spec.rb | 39 +++++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 5 deletions(-) Moving back on ON_DEV until https://github.com/ManageIQ/manageiq-automation_engine/pull/153 is merged. New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/b9c599d5bfb5022dc2cb535b83ca1d54c60b0c5a commit b9c599d5bfb5022dc2cb535b83ca1d54c60b0c5a Author: Greg McCullough <gmccullo> AuthorDate: Fri Jan 26 15:27:55 2018 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Fri Jan 26 15:27:55 2018 -0500 Support calling update_vm_name for miq_provision service models https://bugzilla.redhat.com/show_bug.cgi?id=1455002 lib/miq_automation_engine/service_models/miq_ae_service_miq_provision.rb | 1 + 1 file changed, 1 insertion(+) New commit detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/ad1e960d127cc738e4e0d23eba4315b201595f7c commit ad1e960d127cc738e4e0d23eba4315b201595f7c Author: Greg McCullough <gmccullo> AuthorDate: Fri Feb 2 12:18:06 2018 -0500 Commit: Greg McCullough <gmccullo> CommitDate: Mon Feb 5 10:47:26 2018 -0500 Follow up to update_vm_name for Service template provisioning https://bugzilla.redhat.com/show_bug.cgi?id=1455002 app/models/miq_provision.rb | 2 +- spec/models/miq_provision_spec.rb | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) |