We are trying the custom promise type implementation. A colleague of mine (Dennis Staam) has written a custom promise type:
* certificate
* I forked it and adjust some smaal things:
https://github.com/basvandervlies/cfengine-custom-promises
I is just a check if the certtifacte expires over “x” days.. We use the cfengine library module from core.
When we run the code we get and segmentation fault:
```
17:34 r16n18.mona.surfsara.nl:~/bas/cfengine-custom-promises (main)
root# cf-agent -KI -f ./
promise_test.cf
Traceback (most recent call last):
File "/var/cfengine/promises/certificate.py", line 62, in <module>
CertificatePromiseTypeModule().start()
File "/var/cfengine/promises/cfengine.py", line 83, in start
self._handle_request(request)
File "/var/cfengine/promises/cfengine.py", line 105, in _handle_request
self._handle_validate(promiser, attributes)
File "/var/cfengine/promises/cfengine.py", line 124, in _handle_validate
self.validate_promise(promiser, attributes)
File "/var/cfengine/promises/certificate.py", line 34, in validate_promise
raise ValidationError(f"Certificate path '{promiser}' must be absolute")
cfengine.ValidationError: Certificate path 'etc/certificate/certificate.pem' must be absolute
Segmentation fault
```
When we remove the error line. I get 3 times the mssesage that the file does exists. Is this correct? I assumed we only get
1 message. The same is when the certitifcate expires in x days. We also get this message 3 times.
--
Bas van der Vlies
| Operations, Support & Development | SURFsara | Science Park 140 | 1098 XG Amsterdam
| T
+31 (0) 20 800 1300 |
bas.van...@surf.nl |
www.surf.nl |