Closed chriskuehl closed 8 years ago
@jvperrin @matthew-mcallister
@kpengboy
Looks like it had trouble backing up last night, is the printed view incorrect somehow?
mysqldump: Couldn't execute 'SHOW FIELDS FROM `printed`': View 'ocfprinting.printed' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them (1356)
----------------------------------------------------------------------------
rsnapshot encountered an error! The program was invoked with these options:
/usr/bin/rsnapshot -c /opt/share/backups/rsnapshot.conf sync
----------------------------------------------------------------------------
ERROR: backup_script /opt/share/backups/backup-mysql returned 2
WARNING: Rolling back "mysql/"
Looks like the printed_today
view is missing in the ocfprinting
database right now, so any queries to the printed
view is failing. Is there any reason why it's not present right now? I fixed it by adding back the view using the schema, but it looks like printed
is still broken since all users and the today
column are NULL
.
@jvperrin thanks for the comments
i noticed some other issues as well, going to figure out a reasonable way to get tests for this before i try to merge (and will address your comments as well)
@jvperrin the backup failure is because i was manually messing with the database trying to fix some faulty schema.
decided that was a bad idea and wrote some proper tests now. i'm pretty confident that if these tests pass, the schema is correct. feel free to suggest additional cases i'm not thinking of.
(and this should be ready to ship once i fix a jenkins-only test failure)
@chriskuehl Ok, sounds good!
You can log in to mysql with anonymous (no password) to see the
printed
view which forms the core of the accounting.You can log in with the ocfprinting user (in passwords file) to see the full jobs and refunds tables, plus some additional views.
The functions like get_quota work already (try accounts ckuehl, asdf, hjkl, pubstaff, and some you make up to see how it handles non-existent users).