Open gillfimj opened 1 month ago
Found the resolution to this issue at: https://github.com/jdum/odfdo/issues/39
Apparently, the new release v5.1.1 of lxml removed the _ElementStringResult class. So, with lxml >= 5.1.0, odfdo 3.7.5 is now required if you want to process xml properly with Ansible. To fix the issue, I added odfdo to the pip install line of the tomcat image Dockerfile:
RUN rm -Rf $CATALINA_HOME/webapps.dist \
&& mkdir -p $APP_LOGS \
&& apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y python3-pip locales xtail less gawk unzip gettext-base fontconfig fonts-dejavu \
&& pip3 install ansible==8.7.0 lxml odfdo \ <---this line changed
&& apt-get remove -y build-essential subversion mercurial git openssh-client 'libfreetype*' curl \
&& apt-get purge -y openssh-client \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/* /root/.cache/pip/* \
&& ln -sf /usr/share/zoneinfo/US/Central /etc/localtime \
&& mkdir -p /run.d \
&& cd /ansible \
&& mkdir -p galaxy \
&& ansible-galaxy install --roles-path galaxy -r tomcat-requirements.yml --force
This is not an ansible-tomcat issue, but more of a tomcat image build problem.
Running a tomcat 9 podman container on OEL 8, with CONNATTR_ environment variables being set and receiving the following error:
The interested part of the Dockerfile reads as follows:
The error is occurring in this section of code in the server_xml.yaml
If I'm reading this correctly, it is attempting to remove an attribute that is expecting to exist. I believe this value is getting added in the following step which occurs before the above step:
The value of tomcat_all_connectors_xpath is the following list:
Theoretically, the value that is attempting to be removed should be present, but the error indicates it is not. The better question is why are we forcing the include of the SSLEnabled attribute when we don't need to unless tomcat_ssl_enabled is set to true/yes which, in this case, it is not?
This does not appear to be a problem in the previous Linux 7/tomcat 8/docker environment.
I'm not sure if this is an ansible quirk, an environmental issue or a weird syntax thing. The trail of backup files this process leaves behind shows that this error should NOT be happening.
I have the CONNATTR_ variables set in the StudentApi and IntegrationApi applications. At this point I cannot migrate them to the new host/new tomcat environment.
Relevant versions: