Last modified: 2014-07-17 23:31:01 UTC
On a freshly created instance, /etc/mailname is set to "labs-vmbuilder-precise.eqiad.wmflabs", and that doesn't get fixed by subsequent Puppet runs either. Quoting mailname(5): | DESCRIPTION | The file /etc/mailname is a plain ASCII configura‐ | tion file, which on a Debian system contains the | visible mail name of the system. It is used by | many different programs, usually programs that wish | to send or relay mail, and need to know the name of | the system. | The file contains only one line describing the | fully qualified domain name that the program wish‐ | ing to get the mail name should use (that is, | everything after the @). Git is one of those programs that use /etc/mailname to determine the default mail address of a user.
And just to clarify: While this happens on freshly created instances, it is of course also an issue on instances that have been created some time ago :-). So /etc/mailname needs to be updated site-wide where it is set to "labs-vmbuilder-precise.eqiad.wmflabs".
This patch sets /etc/mailname to contain $::fqdn. Is there ever situation where we'll need more flexibility than that? https://gerrit.wikimedia.org/r/#/c/147150/
I think Tony with his VERP GSoC project might be affected by this. Tony, in your Labs instance, would it do you any harm if /etc/mailname was fixed to something.eqiad.wmflabs? I don't know where exim gets its "identity" from and how that might interact with your scripts.
Change 147150 had a related patch set uploaded by Tim Landscheidt: Set /etc/mailname to contain $::fqdn https://gerrit.wikimedia.org/r/147150
I could potentially change the patch so that it only modifies the file if it contains exactly 'labs-vmbuilder-precise.eqiad.wmflabs'. I'd prefer the generic solution, though, if it doesn't have downsides. For instance, some older instances have the ec2 in that file, which is fairly useless.
(In reply to Tim Landscheidt from comment #3) > I think Tony with his VERP GSoC project might be affected by this. Tony, in > your Labs instance, would it do you any harm if /etc/mailname was fixed to > something.eqiad.wmflabs? I don't know where exim gets its "identity" from > and how that might interact with your scripts. I dont think our instance will have a problem, as the only exim config change we ever needs to do, is the removal of the line errors_to from the required router, so that it can be set by the mailer as per https://gerrit.wikimedia.org/r/#/c/141287/
(In reply to Andrew Bogott from comment #5) > I could potentially change the patch so that it only modifies the file if it > contains exactly 'labs-vmbuilder-precise.eqiad.wmflabs'. I'd prefer the > generic solution, though, if it doesn't have downsides. > For instance, some older instances have the ec2 in that file, which is > fairly useless. Ideally, I would like to see just the initial setting being changed, i. e. the file /etc/mailname on the first boot, without it being managed by Puppet afterwards. But I don't know enough about our OpenStack setup if that is feasible in Labs. (In reply to Tony Thomas from comment #6) > (In reply to Tim Landscheidt from comment #3) > > I think Tony with his VERP GSoC project might be affected by this. Tony, in > > your Labs instance, would it do you any harm if /etc/mailname was fixed to > > something.eqiad.wmflabs? I don't know where exim gets its "identity" from > > and how that might interact with your scripts. > I dont think our instance will have a problem, as the only exim config > change we ever needs to do, is the removal of the line errors_to from the > required router, so that it can be set by the mailer as per > https://gerrit.wikimedia.org/r/#/c/141287/ Then I think the patch can be merged (if the only-initial-setup solution isn't possible/too complicated). If we encounter further obstacles down the line, we can always revert.
(In reply to Tim Landscheidt from comment #7) > (In reply to Andrew Bogott from comment #5) > > I could potentially change the patch so that it only modifies the file if it > > contains exactly 'labs-vmbuilder-precise.eqiad.wmflabs'. I'd prefer the > > generic solution, though, if it doesn't have downsides. > > > For instance, some older instances have the ec2 in that file, which is > > fairly useless. > > Ideally, I would like to see just the initial setting being changed, i. e. > the file /etc/mailname on the first boot, without it being managed by Puppet > afterwards. But I don't know enough about our OpenStack setup if that is > feasible in Labs. I could make a patch in the firstrun script that sets this for new instances. Of course that would leave all the existing instances with the setting that they have now... I'm not entirely clear on if that's a problem or not.
(In reply to Andrew Bogott from comment #8) > [...] > I could make a patch in the firstrun script that sets this for new > instances. Of course that would leave all the existing instances with the > setting that they have now... I'm not entirely clear on if that's a problem > or not. Couldn't we solve that latter bit with a one-time salt call?
(In reply to Tim Landscheidt from comment #9) > (In reply to Andrew Bogott from comment #8) > > [...] > > I could make a patch in the firstrun script that sets this for new > > instances. Of course that would leave all the existing instances with the > > setting that they have now... I'm not entirely clear on if that's a problem > > or not. > > Couldn't we solve that latter bit with a one-time salt call? Yes, for instances that happen to be up and properly running a salt-minion at the time. Precise instances that are created post-salt-call would also continue to have have the wrong mailname since we don't really have a good way to build new precise images anymore. For what it's worth, the firstrun solution would look like this: https://gerrit.wikimedia.org/r/#/c/147314/
Okay, then I think Puppet is the right solution, and I assume merging the firstrun patch as well doesn't hurt?
Change 147150 merged by Andrew Bogott: Set /etc/mailname to contain $::fqdn https://gerrit.wikimedia.org/r/147150