Closed apdibbo closed 9 years ago
Which variable? The line you mention is not an `if`` statement... Can you provide a extract of the faulty code?
The code snippet is:
'/software/components/profile/env' = {
if (is_defined(VO_ATLAS_LOCAL_AREA)) {
SELF['ATLAS_LOCAL_AREA'] = VO_ATLAS_LOCAL_AREA;
};
Why do you say the error is trigged by this piece of code. The error is a validation error and this happens at a stage where it is not possible to say which line is responsible for the misconfiguration... From the error you mention, it's hard to say that this is connected to this. The error looks a bit surprising to me, in particular element at /{ components, { accounts
suggesting that the components are not under /software/components
but under /components
...
Jrha advised me how to troubleshoot this by removing and replacing sections of the standard template to narrow down which section of code it was.
Adding @jrha . I don't have enough context to help here but normally when you have a validation error, it gives the path that trigged the error and its value. Here is an example of validation error that I intentionally created (changing the 'perms' value to a number instead of a string):
[panc] validation error [/scratch/jouvin/quattor/cdb/cfg/clusters/ipno/umd-3.0/profiles/ipngrid80.in2p3.fr.pan]
[panc] validation requires type of 'string' but element is of type 'long'
[panc] element path: '/software/components/filecopy/services/_2fetc_2fcvmfs_2fdefault_2elocal/perms'
[panc] element value: 644
[panc] type: 'string' [?:?]
[panc] type: 'structure_filecopy' [/scratch/jouvin/quattor/cdb/cfg/quattor/14.10.0/components/filecopy/schema.pan:38.27-48.6]
[panc] type: 'component_filecopy' [/scratch/jouvin/quattor/cdb/cfg/quattor/14.10.0/components/filecopy/schema.pan:51.27-55.1]
[panc] path '/software/components/filecopy' bound to type component_filecopy in [/scratch/jouvin/quattor/cdb/cfg/quattor/14.10.0/components/filecopy/schema.pan:57.40-57.57]
In your case the error message looks a bit strange but the path suggests that the problem is with /
, meaning the whole profile... I've the feeling that something weird happened in the way you are constructed the profile, leading to this. But I don't see what could be the link with the template you are mentionning.
This is the code that is at fault:
if (is_defined(VO_ATLAS_LOCAL_AREA)) {
SELF['ATLAS_LOCAL_AREA'] = VO_ATLAS_LOCAL_AREA;
}
It checks if VO_ATLAS_LOCAL_AREA
is defined, but assumes that ATLAS_LOCAL_AREA
is a key of SELF
.
If ATLAS_LOCAL_AREA
is undefined very-bad-things-happen™, which as far as I can tell works like this.
SELF['ATLAS_LOCAL_AREA']
is not definedSELF['ATLAS_LOCAL_AREA']
is therefore equivalent to something like SELF[undef]
'/software/components/profile/env'
is set to VO_ATLAS_LOCAL_AREA
Scrap that, if '/software/components/profile/env'
is undefined it triggers this error.
Apparently you cannot modify a non-existent nlist/dict.
Possibly the compiler could be more helpful.
'/software/components/profile/env' ?= dict();
before this block fixes this problem.
Reproduce with:
#'/software/components/profile/env/' ?= dict(); # Uncomment to fix horrible validation error.
'/software/components/profile/env/' = {
if (is_defined(NONEXISTENT_VARIABLE)) {
SELF['UNICORNS'] = NONEXISTENT_VARIABLE
};
SELF;
};
When neither of the two variables in this if statement (features/cvmfs/client.pan#L317) exist the following occurs on build: