rundeck / rundeck-cli

CLI tool for Rundeck
https://rundeck.github.io/rundeck-cli/
Apache License 2.0
132 stars 50 forks source link

rd acl crashes on test/validate #529

Closed xavier8854 closed 12 months ago

xavier8854 commented 1 year ago

Hi, Rundeck 4.17 and rundeck cli 2.0.7, rd acl crashes when trying to test or validate ACLS Example :

# rd acl validate --dir /etc/rundeck/
picocli.CommandLine$ExecutionException: Error while calling command (public int org.rundeck.client.ext.acl.Acl.validate(org.rundeck.client.ext.acl.Acl$AclOptions)): java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.constructor.Constructor.<init>(java.lang.Class)'
        at picocli.CommandLine.executeUserObject(CommandLine.java:1986)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at org.rundeck.client.tool.Main.main(Main.java:155)
Caused by: java.lang.NoSuchMethodError: 'void org.yaml.snakeyaml.constructor.Constructor.<init>(java.lang.Class)'
        at com.dtolabs.rundeck.core.authorization.providers.yaml.model.YamlPolicyDocConstructor.<init>(YamlPolicyDocConstructor.java:31)
        at com.dtolabs.rundeck.core.authorization.providers.YamlParsePolicy$4.loadAll(YamlParsePolicy.java:743)
        at com.dtolabs.rundeck.core.authorization.providers.YamlPolicyCollection.load(YamlPolicyCollection.java:84)
        at com.dtolabs.rundeck.core.authorization.providers.YamlPolicyCollection.<init>(YamlPolicyCollection.java:54)
        at com.dtolabs.rundeck.core.authorization.providers.YamlPolicyFactoryV2.policiesFromSource(YamlPolicyFactoryV2.java:39)
        at com.dtolabs.rundeck.core.authorization.providers.PolicyCollectionFactory.validate(PolicyCollectionFactory.java:68)
        at com.dtolabs.rundeck.core.authorization.providers.YamlProvider.validate(YamlProvider.java:98)
        at com.dtolabs.rundeck.core.authorization.providers.YamlProvider.validate(YamlProvider.java:85)
        at com.dtolabs.rundeck.core.authorization.providers.YamlProvider.validate(YamlProvider.java:89)
        at org.rundeck.client.ext.acl.Acl.validatePolicies(Acl.java:1080)
        at org.rundeck.client.ext.acl.Acl.validate(Acl.java:584)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1972)
xavier8854 commented 1 year ago

Here is the acl in question, as requested on IRC exporter.aclpolicy.txt

MegaDrive68k commented 1 year ago

Reproduced. Even evaluating single files. Thanks for your feedback @xavier8854 (and Dave :-).

MegaDrive68k commented 1 year ago

Workaround: downgrading the rd cli tool to 2.0.5.