Last modified: 2014-07-17 23:31:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66962, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64962 - /etc/mailname is set to "labs-vmbuilder-precise.eqiad.wmflabs"
/etc/mailname is set to "labs-vmbuilder-precise.eqiad.wmflabs"
Status: PATCH_TO_REVIEW
Product: Wikimedia Labs
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-06 18:22 UTC by Tim Landscheidt
Modified: 2014-07-17 23:31 UTC (History)
5 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Tim Landscheidt 2014-05-06 18:22:54 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.
Comment 1 Tim Landscheidt 2014-05-09 00:42:30 UTC
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".
Comment 2 Andrew Bogott 2014-07-17 17:09:39 UTC
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/
Comment 3 Tim Landscheidt 2014-07-17 17:15:01 UTC
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.
Comment 4 Gerrit Notification Bot 2014-07-17 17:15:18 UTC
Change 147150 had a related patch set uploaded by Tim Landscheidt:
Set /etc/mailname to contain $::fqdn

https://gerrit.wikimedia.org/r/147150
Comment 5 Andrew Bogott 2014-07-17 18:32:12 UTC
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.
Comment 6 Tony Thomas 2014-07-17 18:35:28 UTC
(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/
Comment 7 Tim Landscheidt 2014-07-17 20:55:45 UTC
(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.
Comment 8 Andrew Bogott 2014-07-17 21:22:57 UTC
(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.
Comment 9 Tim Landscheidt 2014-07-17 21:26:24 UTC
(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?
Comment 10 Andrew Bogott 2014-07-17 21:33:53 UTC
(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/
Comment 11 Tim Landscheidt 2014-07-17 21:58:58 UTC
Okay, then I think Puppet is the right solution, and I assume merging the firstrun patch as well doesn't hurt?
Comment 12 Gerrit Notification Bot 2014-07-17 23:31:01 UTC
Change 147150 merged by Andrew Bogott:
Set /etc/mailname to contain $::fqdn

https://gerrit.wikimedia.org/r/147150

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links