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

postage: replaced by pgmanage-10.0.2 #31241

Closed

Conversation

basvandijk
Copy link
Member

Motivation for this change

@LnL7 this is an adapted version of c894327 suitable for NixOS-17.09.

postage is no longer maintained and has been replaced by the identical pgmanage. See:

https://github.com/workflowproducts/postage#postage-has-been-replaced-with-pgmanage

It's important that we switch to pgmanage in order to receive security updates.

In 18.03 the services.postage options will be deprecated and a warning will be raised when services.postage.enable = true. However we can't do this in 17.09 because it will break existing configurations which isn't acceptable within a release. Instead we define the defaults of the new services.pgmanage options in terms of the existing services.postage options.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

postage is no longer maintained and has been replaced by the identical pgmanage. See:

https://github.com/workflowproducts/postage#postage-has-been-replaced-with-pgmanage

In 18.03 the services.postage options will be deprecated and a warning
will be raised when services.postage.enable = true. However we can't
do this in 17.09 because it will break existing configurations which
isn't acceptable within a release. Instead we define the defaults of
the new services.pgmanage options in terms of the existing
services.postage options.
@grahamc
Copy link
Member

grahamc commented Nov 4, 2017

@GrahamcOfBorg postage

1 similar comment
@grahamc
Copy link
Member

grahamc commented Nov 4, 2017

@GrahamcOfBorg postage

config = mkIf cfg.enable {
systemd.services.postage = {
description = "postage - PostgreSQL Administration for the web";
systemd.services.pgmanage = {
Copy link
Member

Choose a reason for hiding this comment

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

not sure how important this is, but the systemd service will get renamed with these changes

Copy link
Member

Choose a reason for hiding this comment

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

that one should be ok.

Copy link
Member

Choose a reason for hiding this comment

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

Hrm, not if you have centralized logging or monitoring for that specific service.

Copy link
Member

@Mic92 Mic92 Nov 9, 2017

Choose a reason for hiding this comment

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

However that should not affect the functionality of the service itself. So a release note should enough for administrators to change there infrastructure.

Copy link
Member

Choose a reason for hiding this comment

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

for 18.03 that's fine, but we should be more careful with changes on an active release IMHO

Copy link
Member

@Mic92 Mic92 Nov 10, 2017

Choose a reason for hiding this comment

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

ah, I did not notice that this was a backport. I agree we have to be more conservative then for 17.09.

@@ -133,10 +132,10 @@ in {

dataRoot = mkOption {
type = types.str;
default = "/var/lib/postage";
default = "/var/lib/pgmanage";
Copy link
Member

@LnL7 LnL7 Nov 6, 2017

Choose a reason for hiding this comment

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

same here, this is probably more important to keep the old behaviour by default.
(assuming it's compatible)

Copy link
Member

Choose a reason for hiding this comment

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

We have stateVersion to cover this.

@LnL7
Copy link
Member

LnL7 commented Nov 6, 2017

@fpletz @globin @vcunat How is stuff like this be handled if it's not possible in a compatible way?

@fpletz fpletz added this to the 17.09 milestone Nov 9, 2017
Copy link
Member

@fpletz fpletz left a comment

Choose a reason for hiding this comment

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

It is reasonable to break compatibility here if we really want to backport the name change. The change could have implications we can't possibly anticipate so the user should be informed. The only way we can do that after a release is by aborting the evaluation with i.e. an assertion. 😒

To the question if we want to backport this at all: @basvandijk Are you expecting that we won't be able to easily backport patches due to the name change?

options.services.postage = pgmanageOptions;
# And define the defaults of the new services.pgmanage in terms of services.postage:
options.services.pgmanage = flip mapAttrs pgmanageOptions (name: option:
option // { default = config.services.postage.${name}; }
Copy link
Member

Choose a reason for hiding this comment

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

This will rebuild the manual every time a postage option is changed. Just setting the pgmanage options in the config attrset should be fine because using both interfaces shouldn't occur. To be safe, you would use mkDefault to set the pgmanage options.

config = mkIf cfg.enable {
systemd.services.postage = {
description = "postage - PostgreSQL Administration for the web";
systemd.services.pgmanage = {
Copy link
Member

Choose a reason for hiding this comment

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

Hrm, not if you have centralized logging or monitoring for that specific service.

@Mic92
Copy link
Member

Mic92 commented Nov 9, 2017

Can you also add the renamed options to: modules/rename.nix

Copy link

@GrahamcOfBorg GrahamcOfBorg left a comment

Choose a reason for hiding this comment

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

Success for system: x86_64-linux

/nix/store/jlf3607589ianvzv3361jsqm1hinirr5-pgmanage-10.0.2

@vcunat
Copy link
Member

vcunat commented Nov 11, 2017

It's important that we switch to pgmanage in order to receive security updates.

It's better to be ready, but I find it unlikely that any security problems appear during the half-year. I tried a CVE search and found nothing relevant to postage at all...

@basvandijk
Copy link
Member Author

Closed in favour of #32006.

@basvandijk basvandijk closed this Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants