cloudera / cm_ext

Cloudera Manager Extensibility Tools and Documentation.
Apache License 2.0
188 stars 133 forks source link

Parcel validator ignores missing scripts.defines #2

Closed skeltoac closed 9 years ago

skeltoac commented 9 years ago

I created a parcel to distribute some files on a cluster. I had no need for environment variables so I omitted the env script. After validating and activating my parcel, CM would fail to start any CDH roles. The STDERR output showed that the PARCEL_DIRNAME was using the name of my parcel instead of CDH. This made it impossible for agent scripts to locate bigtop.

It seems that in /usr/lib/cmf/service/common/cloudera-config.sh source_parcel_environment assumes that $SCRIPT_ARRAY and $DIRNAME_ARRAY are congruent. Because my parcel.json omitted scripts.defines, these arrays were incongruent and so CDH_DIRNAME got set to my parcel's name in cdh_env.sh.

The analysis in the preceding paragraph could be wrong. The upshot is that everything worked again after I added a defines script to my parcel. The parcel validator should not have approved a parcel without the required script.

philipl commented 9 years ago

Good catch. We will update the validator. Thanks!

philipl commented 9 years ago

Fixed in 5.3 update.