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

"Not enough free space on…" : add more storage space info #48

Open
lapineige opened this issue Apr 23, 2023 · 7 comments
Open

"Not enough free space on…" : add more storage space info #48

lapineige opened this issue Apr 23, 2023 · 7 comments

Comments

@lapineige
Copy link
Member

I would like to suggest an improvement to the log message we receive by email.

First of all, error messages such as "Not enough free space on…" could be highlighted (using bold ?) to catch them immediately when reading the email.

Secondly, this "Not enough free space on…" error message could show how big the archive was meant to be, and maybe how much space is available on the targeted storage.
That would help us diagnose this lack of space faster (and maybe detect any sudden drastic increase) to work on a workaround.

I guess it could be done by showing 1) Yunohost message about the final size of the backup 2) the result of df /storage/path command.
I know how to implement the second improvement, but not the first one : how do you catch that log ?

@maniackcrudelis
Copy link
Contributor

I @lapineige
Are you sure you're not mixing a YunoHost backup message with an Archivist one ?
I don't think I've ever implemented such a behavior in here.

@lapineige
Copy link
Member Author

That's the result of archivist cron: email subject nice -n10 /opt/yunohost/archivist/archivist.sh | tee -a /var/log/archivist/archivist.log 2>&1

@maniackcrudelis
Copy link
Contributor

Sure, but that log is mainly YunoHost backup output messages.

You're actually looking for the error message raise YunohostValidationError("not_enough_disk_space", path=self.repo), translated as Not enough free space on '{path}' which is part of YunoHost backup process.

@lapineige
Copy link
Member Author

So what's in the email is the result of that command ?

@maniackcrudelis
Copy link
Contributor

Yes, that's it, the email is the log of Archivist itself and all YNH backup command logs.

As far as I do like your suggestion on an improvement of that error message, this is on YunoHost core side.
What's strange though is that it seems that it's already logged somewhere, since the line 1735 does says Not enough space at %s (free: %s / needed: %d). I've never had that error message myself, I couldn't say, but maybe in the debug log ?

Anyway, if not, it surely should be made more visible for the final user.

@lapineige
Copy link
Member Author

As far as I do like your suggestion on an improvement of that error message, this is on YunoHost core side.

Yes. May I keep this open until I reach out to Yunohost core repository to discuss such a feature ?

@maniackcrudelis
Copy link
Contributor

Yes. May I keep this open until I reach out to Yunohost core repository to discuss such a feature ?

Feel free :)

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

No branches or pull requests

2 participants