migrate printhost to nix#240
Merged
Merged
Conversation
BNH440
force-pushed
the
printhost-migration-v2
branch
14 times, most recently
from
April 8, 2026 18:44
2b0be7d to
c649404
Compare
this commit directly migrates the old puppet config with a few differences: - replacing tea4cups with a new drop-in backend - adding color-double queue to get ready for new color printer
- remove old browse directives no longer supported in cups v2 - disable mDNS / avahi service to not conflict with cups' own service
the printhost url config variable is set to default on all machines except tule so we have to just set it manually
fixes the print dialog long loading time, but we need a better solution in the future
- moved ssl cert moving to its own service as to not override the existing preStart script provided by the nixos module - removed the raw.convs configs as those don't seem to do anything anyways
for some reason the print dialog opens quickly now, not sure what changed so we can re-enable this
it will be way easier to migrate dns if we have the live url not conflict with the future dns changes. we can set this url to printhost.obe after modifying the dns
Contributor
Author
|
ok I actually decided to change the server url from |
Contributor
Author
|
I plan on changing dns on monday after we've proved |
BNH440
disabled auto-merge
April 12, 2026 00:45
This reverts commit 49ed591.
Contributor
Author
|
ok TLS is broken from the client to server and idk why, I set encryption to |
Contributor
Author
|
ok the TLS issue we're having has been fixed and will be in a later update |
BNH440
enabled auto-merge (rebase)
April 12, 2026 01:21
BNH440
disabled auto-merge
April 12, 2026 01:21
BNH440
enabled auto-merge (squash)
April 12, 2026 01:22
BNH440
disabled auto-merge
April 13, 2026 05:00
Contributor
Author
|
disabled auto merge so this doesn't get auto deployed during lab hours on Monday if approved |
oliver-ni
previously approved these changes
Apr 13, 2026
Contributor
Author
|
oh I didn't realize that would cancel the review 😭 |
jaysa68
approved these changes
Apr 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
migrates the
whiteoutconfig with some MAJOR CHANGES:OCF-BWfor black&white, andOCF-Colorfor coloripponwhiteout)socketis just way faster, it causes the printers to queue a set of prints locally which allows them to print multiple documents in a row without spooling down and back up again. (as opposed to the jobs all queuing in the cups queue before being sent after the printer is confirmed finished printing the last doc)ipps(which we weren't actually using on epson with whiteout) we can have an encrypted connection, but due to what I mentioned above, the extra security ofippsis just not worth the speed differencenote: I did NOT go with the approach I mentioned a few days ago about having a client side cups server that did the filtering (driver stack / postscript conversion) and then sent to a remote cups server. I ended up having a lot of problems with double filtering, but the main reason was that I discovered I could create basically the same pipeline without any of the downsides by using a fake printer in front of the class. (which is what the client did but just more complicated) So we are NOT using
cups-browsedor anything related to it anymore (compared to the double cups server approach).note: we are still billing by sides of paper because counting physical pages before sending to the printer is very difficult. more details:
Why did clients not understand the printer capabilities (page size, double sided, etc)
-double,-single), which is no longer required because the client now receives more detailed information about the printer from the server, which makes the double sided dialogue show up as the client knows it's supportedppd/ printer driver that contains the printer's capabilities.New Pipeline
What changes for the user?
the user will now see
OCF-BWandOCF-Color, they will choose between those as usual, but for double sided they can change the two-sided setting on the print dialog.The black and white default is double sided and the color default is single sided. I think this best represents what most people use the two modes for (B&W for documents, Color for fliers).
TODO in the future
printhost.ocf.berkeley.edutotule(and modify client to point toprinthostagain)new color printer installation
auth.ocf.berkeley.edu(which will also auto login on desktops with a kerberos ticket). Except OAuth is added in CUPS 2.5, which is currently in beta. We can update and configure this once cups is updated in nixpkgs.ongoing issues
IfRequesteduntil this change gets into a release: CUPS sometimes hangs for 10 seconds when a client connects to it via TLS OpenPrinting/cups#1128 OpenPrinting/cups@cdd7cf4fixed issues:
- need to check printing from servers(lp works)- need to check print failure emails(works!)- need to check A5 printing(it auto scales to letter 🎉)- billing seems to be incorrect for copies (at least on BW)(FIXED)- color printing broken (filter failed)(FIXED)- the user.js change didn't work d1607ac(FIXED)QUOTA IS NOT CHECKED!!! - need to add back the postscript filter for page count and remove epson support(FIXED 🎉)