TypeError: cannot concatenate 'str' and 'ReconfigError' objects when error on attributes entry-condor_tarball not matched in the glideinWMS.xml file
Context: A collateral error was found out when manipulating entries configuration in the glideinWMS.xml file from a Factory test.
Details: When there is entry attribute - condor_tarball attribute not matched in the glideinWMS.xml and any service is being activated, a concatenation error appears in the background related to the code.
Example: Reconfiguration in the Factory test that was created (fermicloud137.fnal.gov)
[root@fermicloud137 gwms-factory]# /usr/sbin/gwms-factory reconfig Using default factory config file: /etc/gwms-factory/glideinWMS.xml Reconfiguring the factoryCondor (version=default, os=rhel6, arch=default) for entry ITB_FC_CE2 could not be resolved from <glidein><condor_tarballs>...</condor_tarballs></glidein> configuration. Traceback (most recent call last): File "/sbin/reconfig_glidein", line 251, in <module> print2(re) File "/sbin/reconfig_glidein", line 41, in print2 journal.send( message ) File "/usr/lib64/python2.7/site-packages/systemd/journal.py", line 391, in send args = ['MESSAGE=' + MESSAGE] TypeError: cannot concatenate 'str' and 'ReconfigError' objects [FAILED]
Action: Need to be investigated and solved.
#4 Updated by Lorena Lobato Pardavila over 2 years ago
- Reproduction Steps:
To reproduce the problem and have clear in which use case this occurs, any of the attributes need to be changed in etc/gwms-factory/glideinWMS either for factory el6 or el7.
- Have tried changing different parameters in order to identify which is the pattern that trigger this error. * Have tried to change the OS when architecture is “x86” or “default” and even it was changed, the problem is when “version=default”. * The error appears in el7 and NOT in el6.
- Test machines
- As it's on el7, I won't be using gwms-dev-factory(el6). Dennis added me in .k5login for fermicloud036 factory and frontend=*fermicloud141*. The two CEs right now are fermicloud025 and fermicloud121, no outside access. * We should see the errors in: /var/log/gwms-factory/server/factory/factory.err.log
#5 Updated by Lorena Lobato Pardavila over 2 years ago
- Status changed from Assigned to Feedback
- Assignee changed from Lorena Lobato Pardavila to Marco Mambelli
- Problem: As specified previously, the problems occurs on el7 and it's that message can be either of type string or of type Exception.
- Solution: The fix needs to go to both creation/reconfig_frontend and creation/reconfig_glidein
They both have the following definition near the top:
try: # necessary because systemd is not on rhel6 from systemd import journal def print2( message ): print message journal.send( message )
try: # necessary because systemd is not on rhel6 from systemd import journal def print2( message ): message2 = str(message) print message2 journal.send( message2 )
#6 Updated by Lorena Lobato Pardavila over 2 years ago
- Assignee changed from Marco Mambelli to Lorena Lobato Pardavila
After the feedback, I have updated the branch
commit bc6df2eadaf242d498d45501bcc036d6fefd172d (HEAD -> v3/19325, origin/v3/19325)
Author: Lorena Lobato <email@example.com>
Date: Tue Apr 24 14:30:13 2018 -0500
Corrected empty lines around the string assignment
Ready to merge