HCL-TECH-SOFTWARE / connections-automation

Deployment and upgrade automation scripts for HCL Connections 7.0 based on Ansible
Apache License 2.0
17 stars 31 forks source link

Setup Orientme makes duplicate entries in LotusConnections-config.xml #290

Open stoeps13 opened 1 year ago

stoeps13 commented 1 year ago

After deploying Connections, I changed the URL for ic_internal, but LotusConnections-config.xml still had the old entry for /social:

<!-- BEGIN Enabling OrientMe -->
<sloc:serviceReference serviceName="orient"
  enabled="true"
  ssl_enabled="true"
  bootstrapHost="cnx8-ora-was.stoeps.home"
  bootstrapPort="admin_replace"
  clusterName="">
  <sloc:href>
      <sloc:hrefPathPrefix>/social</sloc:hrefPathPrefix>
      <sloc:static href="http://cnx8-ora-was.stoeps.home" ssl_href="https://cnx8-ora-was.stoeps.home" />
      <sloc:interService href="https://cnx8-ora-was.stoeps.home" />
  </sloc:href>
</sloc:serviceReference>
<!-- END Enabling OrientMe -->
  <!-- BEGIN Enabling OrientMe -->
  <sloc:serviceReference bootstrapHost="cnx8-ora-was.stoeps.home" bootstrapPort="admin_replace" clusterName="" enabled="true" serviceName="orient" ssl_enabled="true">
    <sloc:href>
      <sloc:hrefPathPrefix>/social</sloc:hrefPathPrefix>
      <sloc:static href="http://cnx8-ora-was.stoeps.home" ssl_href="https://cnx8-ora-was.stoeps.home"/>
      <sloc:interService href="https://cnx8-ora-was.stoeps.home"/>
    </sloc:href>
  </sloc:serviceReference>
  <!-- END Enabling OrientMe -->

There are 2 entries of the blockinfile changes, both with the marker, but the second one indented 2 chars. When I run the postinstall again with different ic_internal, then the first block gets changed, but the second still exists and keeps the old values.

Code in https://github.com/HCL-TECH-SOFTWARE/connections-automation/blob/4e0466a74b400835172d5a83c70ffcbac7e62c4f/roles/hcl/component-pack/post-install-config/tasks/setup_orientme.yml#L2

I have no idea, why this part duplicates, but I checked in several deployments with Ansible and all are doubled. The first block always separates the XML attributes with line feeds, and the second one does not.

sabrina-yee commented 1 year ago

I suspect it's related to https://github.com/ansible/ansible/issues/38417 Maybe we can use xml instead of blockinfile for this.

stoeps13 commented 1 year ago

I checked a 7.0 deployment, there the block is only once in LCC. All checked 8 deployments show the block doubled, maybe it happens during CR deployment.