Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
TemplateSync plug-in import is replacing lock templates even setting for "Force import = no"
Version-Release number of selected component (if applicable):
Satellite 6.3.0 Beta
tfm-rubygem-foreman_templates-5.0.1-1.fm1_15.el7sat.noarch
How reproducible:
Steps to Reproduce:
1. Keep "Force import = no" under Administer→Settings→Templates
2. make changes under any exported template ( which in lock state at Satellite):
e.g. XenServer default finish
3. run below to import:
# foreman-rake templates:import
Actual results:
~~~~
@@ -1,8 +1,9 @@
<%#
-kind: finish
name: XenServer default finish
-oses:
-- XenServer
--%>
+snippet: false
+model: ProvisioningTemplate
+kind: finish
+%>
#!/bin/bash
/usr/bin/wget --output-document=/dev/null <%= foreman_url('built') %>
+######### This is test ##### <=== This is change
XenServer default finish - import success
Parsing: /provisioning_templates/PXELinux/xenserver_default_pxelinux.erb
Updating Template id 50:XenServer default PXELinux
--- /tmp/diffy20171218-10743-1orir5y 2017-12-18 07:47:29.891607520 -0500
+++ /tmp/diffy20171218-10743-18155z9 2017-12-18 07:47:29.891607520 -0500
~~~~
Expected results:
If setting is "Force import = no" then lock template should not be replace.
Additional info:
Thanks, I've created a new component for it. Please prefer using API, rake tasks are not recommended as they bypass proper authentication and authorization. Is it reproducible using API?
Thanks , Issue is not reproducible with API:
"Parsing: /provisioning_templates/provision/xenserver_default_answerfile.erb","Skipping Template id 48:XenServer default answerfile - template is locked","XenServer default answerfile - import failure","Parsing: /partition_tables_templates/xenserver_default.erb"," No change to Ptable id 94:XenServer default","XenServer default - import success","Parsing: /partition_tables_templates/mylocalxenserver_default.erb"," No change to Ptable id 132:MyLocalXenServer default","MyLocalXenServer default - import success"]}
This Bug can close.
Description of problem: TemplateSync plug-in import is replacing lock templates even setting for "Force import = no" Version-Release number of selected component (if applicable): Satellite 6.3.0 Beta tfm-rubygem-foreman_templates-5.0.1-1.fm1_15.el7sat.noarch How reproducible: Steps to Reproduce: 1. Keep "Force import = no" under Administer→Settings→Templates 2. make changes under any exported template ( which in lock state at Satellite): e.g. XenServer default finish 3. run below to import: # foreman-rake templates:import Actual results: ~~~~ @@ -1,8 +1,9 @@ <%# -kind: finish name: XenServer default finish -oses: -- XenServer --%> +snippet: false +model: ProvisioningTemplate +kind: finish +%> #!/bin/bash /usr/bin/wget --output-document=/dev/null <%= foreman_url('built') %> +######### This is test ##### <=== This is change XenServer default finish - import success Parsing: /provisioning_templates/PXELinux/xenserver_default_pxelinux.erb Updating Template id 50:XenServer default PXELinux --- /tmp/diffy20171218-10743-1orir5y 2017-12-18 07:47:29.891607520 -0500 +++ /tmp/diffy20171218-10743-18155z9 2017-12-18 07:47:29.891607520 -0500 ~~~~ Expected results: If setting is "Force import = no" then lock template should not be replace. Additional info: