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

Error log: Collection entities does not exist. Currently in strict mode. #422

Open
AlvaroVega opened this issue Jan 30, 2020 · 8 comments
Open

Comments

@AlvaroVega
Copy link
Member

AlvaroVega commented Jan 30, 2020

perseo.log-20200123.gz:time=2020-01-22T12:17:42.724Z | lvl=ERROR | corr=n/a | trans=n/a | op=initialRefresh | comp=perseo-fe | srv=n/a | subsrv=n/a | msg= Collection entities does not exist. Currently in strict mode.

p-fe 1.9.0 y p-core 1.4.0

@AlvaroVega
Copy link
Member Author

AlvaroVega commented May 28, 2020

It happens at https://github.com/telefonicaid/perseo-fe/blob/master/lib/models/entitiesStore.js#L65
which is invoked by checkNoSignal

config.orionDb = {
    url: 'mongodb://localhost:27017/orion',
    collection: 'entities',
    prefix: 'orion',
    batchSize: 500
};

Orion db.entities collection is not created by perseo-fe and may not exists when a service is deleted (but still not theirs rules).

A possible workaround could be disable strict mode since find can work with and empty collection,
but desirable a log which op, service/subservice and rule are involved.

@fgalan
Copy link
Member

fgalan commented May 29, 2020

Fixed in PR #447 ? Should be closed or is there something else pending?

@AlvaroVega
Copy link
Member Author

PR #447 do not solve this issue, only improve error log

@AlvaroVega
Copy link
Member Author

IMHO this issue is not a bug, it is just a operational error: there are nosignal rules which were not deleted with their service.

@fgalan
Copy link
Member

fgalan commented Jun 1, 2020

IMHO this issue is not a bug, it is just a operational error: there are nosignal rules which were not deleted with their service.

Maybe in that case the error should clearly specify the cause? I mean, instead of:

Collection entities does not exist. Currently in strict mode.

tell something like:

The following rule: {ruleName} is a no signal rule on service {service} that seems not existing in the DB

or something similar

@AlvaroVega
Copy link
Member Author

Agree on #422 (comment), that's the reason for keep improving logs:
#448

@fgalan
Copy link
Member

fgalan commented Jun 1, 2020

Is this issue closeable after PR #448 (maybe with an extra fix to the CNR to be more precise in the current line about this)?

@fgalan
Copy link
Member

fgalan commented Nov 10, 2020

Confirmed by skype with @AlvaroVega that there are pending aspects on this issue, so it needs to be opened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants