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

qos fails with Attribute is not defined: QOS_POLICY #7678

Open
kofemann opened this issue Oct 11, 2024 · 2 comments
Open

qos fails with Attribute is not defined: QOS_POLICY #7678

kofemann opened this issue Oct 11, 2024 · 2 comments
Assignees
Labels

Comments

@kofemann
Copy link
Member

Found in log files of prod system.

 java.lang.IllegalStateException: Attribute is not defined: QOS_POLICY
         at org.dcache.vehicles.FileAttributes.guard(FileAttributes.java:335)
         at org.dcache.vehicles.FileAttributes.getQosPolicy(FileAttributes.java:777)
         at org.dcache.qos.services.engine.provider.PolicyBasedQoSProvider.fetchRequirements(PolicyBasedQoSProvider.java:136)
         at org.dcache.qos.services.engine.provider.PolicyBasedQoSProvider.fetchRequirements(PolicyBasedQoSProvider.java:129)
         at org.dcache.qos.local.clients.LocalQoSRequirementsClient.fileQoSRequirementsRequested(LocalQoSRequirementsClient.java:81)
         at org.dcache.qos.services.engine.handler.FileQoSStatusHandler.fileQoSStatusChanged(FileQoSStatusHandler.java:470)
         at org.dcache.qos.services.engine.handler.FileQoSStatusHandler.lambda$handleAddCacheLocation$0(FileQoSStatusHandler.java:195)
         at org.dcache.util.BoundedExecutor$Worker.run(BoundedExecutor.java:247)
         at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
         at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
         at java.base/java.lang.Thread.run(Thread.java:829)

Casuse:

        FileAttributes attributes = descriptor.getAttributes();
        if (attributes.isDefined(FileAttribute.QOS_POLICY) && attributes.getQosPolicy() == null) {
            /*
             * This is a lazily discovered change, so
             * as a matter of consistency it calls for removal
             * of the pnfsid from the engine's tracking tables.
             */
            engineDao.delete(update.getPnfsId());
            return super.fetchRequirements(update, descriptor);
        }

        return fetchRequirements(update, descriptor);
    }

    @Override
    public FileQoSRequirements fetchRequirements(FileQoSUpdate update, FileQoSRequirements descriptor)
          throws QoSException {
        FileAttributes attributes = descriptor.getAttributes();
        String name = attributes.getQosPolicy();

When policy is not defined, then fetchRequirements is called, which invokes attributes.getQosPolicy()
TheString name = attributes.getQosPolicy();` called when

@khys95
Copy link
Contributor

khys95 commented Nov 19, 2024

reviewing

@khys95
Copy link
Contributor

khys95 commented Nov 19, 2024

@kofemann did you mean to finish that sentence?
Otherwise, I dont think it makes sense

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

No branches or pull requests

2 participants