Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to re-create legacy whitelist table #135

Open
eperott opened this issue Nov 14, 2019 · 0 comments
Open

Unable to re-create legacy whitelist table #135

eperott opened this issue Nov 14, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@eperott
Copy link
Collaborator

eperott commented Nov 14, 2019

When upgrading to ecAudit 2.0.0 or later a new format for the internal whitelist table is introduced. Once the upgrade is completed it is recommended to drop the legacy whitelist table using a custom cql command.

If for some reason the operator trigger this command to early (before all nodes are upgraded to ecAudit 2.0.0 or later), then it should be possible to re-create the legacy whitelist table simply by restarting one of the nodes which is still running on the old version. However, this doesn't work. Instead nodes fail to start:

2019-11-14T08:21:11.625+0100 [main] ERROR o.a.c.service.CassandraDaemon:726 exitOrFail Exception encountered during startup
java.lang.AssertionError: org.apache.cassandra.exceptions.InvalidRequestException: unconfigured table role_audit_whitelists
        at com.ericsson.bss.cassandra.ecaudit.auth.WhitelistDataAccess.prepare(WhitelistDataAccess.java:158) ~[ecaudit_c3.0-1.0.0.jar:na]
        at com.ericsson.bss.cassandra.ecaudit.auth.WhitelistDataAccess.setup(WhitelistDataAccess.java:59) ~[ecaudit_c3.0-1.0.0.jar:na]
        at com.ericsson.bss.cassandra.ecaudit.auth.AuditWhitelistManager.setup(AuditWhitelistManager.java:75) ~[ecaudit_c3.0-1.0.0.jar:na]
        at com.ericsson.bss.cassandra.ecaudit.auth.AuditRoleManager.setup(AuditRoleManager.java:78) ~[ecaudit_c3.0-1.0.0.jar:na]
        at org.apache.cassandra.service.StorageService.doAuthSetup(StorageService.java:1006) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.StorageService.finishJoiningRing(StorageService.java:997) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.StorageService.joinTokenRing(StorageService.java:934) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:659) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.StorageService.initServer(StorageService.java:572) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.CassandraDaemon.setup(CassandraDaemon.java:362) [apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.CassandraDaemon.activate(CassandraDaemon.java:585) [apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.service.CassandraDaemon.main(CassandraDaemon.java:713) [apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
Caused by: org.apache.cassandra.exceptions.InvalidRequestException: unconfigured table role_audit_whitelists
        at org.apache.cassandra.thrift.ThriftValidation.validateColumnFamilyWithCompactMode(ThriftValidation.java:119) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:897) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at org.apache.cassandra.cql3.statements.SelectStatement$RawStatement.prepare(SelectStatement.java:892) ~[apache-cassandra-3.0.17-E004.jar:3.0.17-E004]
        at com.ericsson.bss.cassandra.ecaudit.auth.WhitelistDataAccess.prepare(WhitelistDataAccess.java:154) ~[ecaudit_c3.0-1.0.0.jar:na]
        ... 11 common frames omitted

Neither is it possible to create this table manually (since this is not allowed in system keyspaces), leaving the operator in a rather tricky situation.

@eperott eperott added the bug Something isn't working label Feb 24, 2020
@RhoderickGalero RhoderickGalero moved this to Todo issue in C2T Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant