cloudera-scripts-for-log4j icon indicating copy to clipboard operation
cloudera-scripts-for-log4j copied to clipboard

HDP: We added code to run the patch on the active name node only.

Open nashvm opened this issue 4 years ago • 5 comments

We run the patch with ansible on all machines.

Added code in patch_hdfs_tgz.sh:

kinit -kt $keytab $principal # under this line.

hdfs haadmin -getAllServiceState | grep active | grep hostname active_nn=$? if [ $active_nn -eq 1 ] exit 0 fi

nashvm avatar Dec 15 '21 09:12 nashvm

Thanks for the suggestion. We will look into this. Note that there is already code which ensures via a marker file that even when the HDFS phase runs on multiple hosts, only one will modify the HDFS contents.

jtran-cloudera avatar Dec 15 '21 23:12 jtran-cloudera

Thanks for the suggestion. We will look into this. Note that there is already code which ensures via a marker file that even when the HDFS phase runs on multiple hosts, only one will modify the HDFS contents.

But this command ps -efww | grep org.apache.hadoop.hdfs.server.namenode.NameNode | grep -v grep in hdp_log4j_jndi_removal.sh returns true for both the active and standby NNs, so patch_hdfs_tgz.sh script run twice which will be duplicate effort and time consuming.

dins2k2 avatar Dec 16 '21 12:12 dins2k2

Ah, this was on HDP? I see that the marker file logic doesn't exist there.

jtran-cloudera avatar Dec 16 '21 17:12 jtran-cloudera

Ah, this was on HDP? I see that the marker file logic doesn't exist there.

Yes

dins2k2 avatar Dec 18 '21 14:12 dins2k2

@jtran-cloudera Any update on fixing this?

dins2k2 avatar Dec 21 '21 18:12 dins2k2