IFCA-Advanced-Computing / caso

cASO is an OpenStack Accounting extractor
Apache License 2.0
9 stars 13 forks source link

tenant or project in voms.json #44

Closed itvasile closed 6 years ago

itvasile commented 6 years ago

Following the warning in caso.log:

/usr/lib/python2.7/site-packages/caso/extract/base.py:72: DeprecationWarning: Using deprecated 'tenant' mapping, please use 'projects' instead

I used project and projects instead of tenant, which broke the accounting. The result is no FQAN line in logs, and the tenant/VO reported in accounting is None

alvarolopez commented 6 years ago

What OpenStack version are you using?

Can you show me your mapping file?

itvasile commented 6 years ago

OpenStack Newton voms.json looks like this:

{
    "fedcloud.egi.eu": {
        "project": "fedcloud.egi.eu"
    },
    "ops": {
        "project": "ops"
    },
    "dteam": {
        "project": "dteam"
    }
}

In this form, I do not have the warning but it does not recognize the VO FQAN.

alvarolopez commented 6 years ago

You have to use projects instead of project and add it as a list, even if it contains a single element, like this:

{
    "fedcloud.egi.eu": {
        "projects": ["fedcloud.egi.eu"]
    },
    "ops": {
        "projects": ["ops"]
    },
    "dteam": {
        "projects": ["dteam"]
    }
}

I will update the documentation to be more clear.

alvarolopez commented 6 years ago

This was fixed in #46