Comments (9)
Which variable? The line you mention is not an `if`` statement... Can you provide a extract of the faulty code?
from template-library-standard.
The code snippet is:
'/software/components/profile/env' = {
if (is_defined(VO_ATLAS_LOCAL_AREA)) {
SELF['ATLAS_LOCAL_AREA'] = VO_ATLAS_LOCAL_AREA;
};
from template-library-standard.
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
...
from template-library-standard.
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.
from template-library-standard.
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.
from template-library-standard.
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 likeSELF[undef]
'/software/components/profile/env'
is set toVO_ATLAS_LOCAL_AREA
- Validation error is triggered.
from template-library-standard.
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.
from template-library-standard.
'/software/components/profile/env' ?= dict();
before this block fixes this problem.
from template-library-standard.
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;
};
from template-library-standard.
Related Issues (20)
- hardware/cpu/intel add embedded cpus HOT 2
- cvmfs client is not configured correctly HOT 1
- frontier file name 'customized.sh' HOT 1
- way to set lvm raid type when vol type = lvm
- Clean-up os/kernel_version_arch to remove all the errata management
- EL8: NetworkManager rebuild resolv.conf at each reboot HOT 1
- Use metaconfig for Pakiti 3 support
- New frontier feature needed
- cvmfs 2.1.20 rpms
- Passing mount and mkfs options to filesystem/config HOT 1
- features/cvmfs/client does not compare versions correctly
- cvmfs: use metaconfig and make the code more generic
- cvmfs: specify which client version to be installed
- Generation of DISK_VOLUME_PARAMS will not work with panc 10.3
- Move hardware/nic/legacy contents to appropriate hardware/nic/vendor HOT 8
- 16.8.0-rc1: wrong namespace for some network cards and CPUs HOT 1
- nic/by_driver/bnx2* templates: improperly designated as Qlogic drivers HOT 4
- 16.10.0-rc1 fetch-crl/config: function matches used instead of match HOT 1
- filesystem/config: add esp flag to a UEFI boot partition HOT 1
- Change value of 'model' field to real model name in CPU templates HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from template-library-standard.