Skip to content

Silence unpickle errors in accounting daemon for Archives without meta.pck - #602

Merged
jonasbardino merged 1 commit into
nextfrom
adjust/accounting-to-be-quieter-about-archives-without-meta-file
Jul 30, 2026
Merged

Silence unpickle errors in accounting daemon for Archives without meta.pck#602
jonasbardino merged 1 commit into
nextfrom
adjust/accounting-to-be-quieter-about-archives-without-meta-file

Conversation

@jonasbardino

Copy link
Copy Markdown
Contributor

Use allow_missing flag to unpickle call so that accounting only warns about Archives without meta.pck file rather than reporting unpickle error and warning. Then the resulting empty meta dict will result in the warning and skip as suggested in #601.

… about

Archives without `meta.pck` file rather than reporting unpickle error and
warning.
@jonasbardino jonasbardino self-assigned this Jul 17, 2026
@jonasbardino jonasbardino added the enhancement New feature or request label Jul 17, 2026
@jonasbardino

Copy link
Copy Markdown
Contributor Author

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

@jonasbardino
jonasbardino marked this pull request as ready for review July 17, 2026 08:41
@jonasbardino
jonasbardino requested a review from Martin-Rehr July 17, 2026 08:41
Comment thread mig/lib/accounting.py
@Martin-Rehr

Copy link
Copy Markdown
Contributor

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

@Martin-Rehr Martin-Rehr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The underlying faulty legacy archive metadata should be fixed rather than ignored

@jonasbardino

Copy link
Copy Markdown
Contributor Author

The underlying faulty legacy archive metadata should be fixed rather than ignored

That may be the case but I still would say it's not an accounting error, so the absence of meta should at most be logged as a single warning and not repeatedly nag us about it. For recent archives you may also just stumble upon lacking meta because it's currently being created.

We have a TODO about checking archives in janitor to catch and fix the case of ones stuck in UPDATING, and checking validity of all archives would fit well there. Then it could either try to fix any broken ones or occasionally notify admins with proper back-off like we do for failing requests in #600.

@jonasbardino

Copy link
Copy Markdown
Contributor Author

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though.
Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

@Martin-Rehr

Copy link
Copy Markdown
Contributor

The underlying faulty legacy archive metadata should be fixed rather than ignored

That may be the case but I still would say it's not an accounting error, so the absence of meta should at most be logged as a single warning and not repeatedly nag us about it. For recent archives you may also just stumble upon lacking meta because it's currently being created.

We have a TODO about checking archives in janitor to catch and fix the case of ones stuck in UPDATING, and checking validity of all archives would fit well there. Then it could either try to fix any broken ones or occasionally notify admins with proper back-off like we do for failing requests in #600.

It's (also) an accounting error since the size of the freeze archive is not accounted fore, but fine with me to leave it to the janitor to keep the freeze archives sane.

@Martin-Rehr

Copy link
Copy Markdown
Contributor

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though. Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

The design is that the quota information in quota_home is populated by the grid_quota daemon.

NOTE: For legacy FS's that we don't wan't to integrate in the grid_quota daemon (such as gluster) it's populated from an external source.

@Martin-Rehr Martin-Rehr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved with the condition that the janitor will take care of fixing / screaming about broken archives.

@jonasbardino

Copy link
Copy Markdown
Contributor Author

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though. Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

The design is that the quota information in quota_home is populated by the grid_quota daemon.

NOTE: For legacy FS's that we don't wan't to integrate in the grid_quota daemon (such as gluster) it's populated from an external source.

Could you please point me to where grid_quota handles anything regarding archives in the non-gluster case? Because I still can't find anything or even mention of freeze_home apart from that legacy meta.pck load when browsing or greping the code in sbin/grid_{quota,accounting}.py and mig/lib/*.py.

@jonasbardino

Copy link
Copy Markdown
Contributor Author

Approved with the condition that the janitor will take care of fixing / screaming about broken archives.

That task is now registered in #633.

@Martin-Rehr

Martin-Rehr commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though. Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

The design is that the quota information in quota_home is populated by the grid_quota daemon.
NOTE: For legacy FS's that we don't wan't to integrate in the grid_quota daemon (such as gluster) it's populated from an external source.

Could you please point me to where grid_quota handles anything regarding archives in the non-gluster case? Because I still can't find anything or even mention of freeze_home apart from that legacy meta.pck load when browsing or greping the code in sbin/grid_{quota,accounting}.py and mig/lib/*.py.

Good catch, it doesn't seem like the freeze (archives) made it into the grid_quota daemon (yet) for lustre:

# Update quota

@jonasbardino

Copy link
Copy Markdown
Contributor Author

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though. Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

The design is that the quota information in quota_home is populated by the grid_quota daemon.
NOTE: For legacy FS's that we don't wan't to integrate in the grid_quota daemon (such as gluster) it's populated from an external source.

Could you please point me to where grid_quota handles anything regarding archives in the non-gluster case? Because I still can't find anything or even mention of freeze_home apart from that legacy meta.pck load when browsing or greping the code in sbin/grid_{quota,accounting}.py and mig/lib/*.py.

Good catch, it doesn't seem like the freeze (archives) made it into the grid_quota daemon (yet) for lustre:

# Update quota

Alright, not just me going crazy then :-)

Not urgent for us I suppose but perhaps an idea to register an issue to track it.

@jonasbardino
jonasbardino merged commit 57b5ac7 into next Jul 30, 2026
17 checks passed
@jonasbardino
jonasbardino deleted the adjust/accounting-to-be-quieter-about-archives-without-meta-file branch July 30, 2026 15:06
@Martin-Rehr

Martin-Rehr commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Looking at the code it appears it only does accounting for legacy Archives in freeze_home/Archive-XYZ123, btw. That should be extended to also cover modern ones in freeze_home/USER_ID/Archive-XYZ123 if so.

Modern archives are accounted for:

if freeze_bytes > 0:

Alright, I went looking for somewhere traversing freeze_home but didn't find anything in the code. Now looking at my Account page they do appear to be counted, though. Are the quota_home/*.pck files it parses into freeze_quota_files and iterates over filled by some external FS (Lustre) entity?

The design is that the quota information in quota_home is populated by the grid_quota daemon.
NOTE: For legacy FS's that we don't wan't to integrate in the grid_quota daemon (such as gluster) it's populated from an external source.

Could you please point me to where grid_quota handles anything regarding archives in the non-gluster case? Because I still can't find anything or even mention of freeze_home apart from that legacy meta.pck load when browsing or greping the code in sbin/grid_{quota,accounting}.py and mig/lib/*.py.

Good catch, it doesn't seem like the freeze (archives) made it into the grid_quota daemon (yet) for lustre:

# Update quota

Alright, not just me going crazy then :-)

Not urgent for us I suppose but perhaps an idea to register an issue to track it.

Done with issue ##635

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Accounting daemon should back off or quietly skip Archives without meta.pck file

2 participants