Bug 12580 - [Regression] drakhosts only adjusts /etc/hosts on hostname change, but misses /etc/sysconfig/network and /etc/hostname
Summary: [Regression] drakhosts only adjusts /etc/hosts on hostname change, but misses...
Status: REOPENED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Colin Guthrie
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-04 20:24 CET by Florian Hubold
Modified: 2022-07-16 13:48 CEST (History)
5 users (show)

See Also:
Source RPM: drakx-net-2.12-1.mga4.src.rpm
CVE:
Status comment:


Attachments

Description Florian Hubold 2014-02-04 20:24:12 CET
Description of problem:


After upgrading to Mageia 4, and adjusting hostname via drakhosts, effective hostname is still Mageia3, because this is defined via /etc/sysconfig/network and /etc/hostname

Seems this was changed to fix https://bugs.mageia.org/show_bug.cgi?id=2983 with http://svnweb.mageia.org/packages?view=revision&revision=190394 but seems not fixed now :/

This worked before in Mageia 3 as intended, please fix.


Reproducible: 

Steps to Reproduce:
Manuel Hiebel 2014-02-05 00:27:01 CET

CC: (none) => thierry.vignaud

Comment 1 Florian Hubold 2014-02-05 20:12:58 CET
In retrospective, hostname was set via drakconnect.

Still, problem remains. Is drakhosts only meant to be a stupid editor for /etc/hosts? Than what would be the correct way currently to only change my hostname via Mageia tools?

CC: (none) => doktor5000

Comment 2 Olivier FAURAX 2014-11-21 13:42:12 CET
Is this still valid?
If yes, can you provide a simple way to reproduce the bug?

CC: (none) => olivier

Comment 3 Colin Guthrie 2014-11-21 17:30:09 CET
FWIW, we should probably stop updating /etc/hosts anyway. nss-myhostname takes care of that for us automatically.
Comment 4 Florian Hubold 2014-11-21 22:00:37 CET
(In reply to Olivier FAURAX from comment #2)
> Is this still valid?
> If yes, can you provide a simple way to reproduce the bug?

Yes, still valid - we have no tool to set or change the hostname after installation. drakconnect allows for that only in advanced mode, and when not using DHCP configuration.

We should probably have a simple frontend to hostnamectl ...
Comment 5 Colin Guthrie 2014-11-22 12:07:39 CET
(In reply to Florian Hubold from comment #4)
> We should probably have a simple frontend to hostnamectl ...

Or rather we should probably have a simple frontend to the dbus service that hostnamectl also connects to. Writing a wrapper around a command line program which talks to a dbus service seems kinda wrong :)
Comment 6 Angelo Naselli 2014-11-22 12:19:22 CET
@Colin #comment 5, have you got any specification for that to read? We could think to try that way in manahost for adminpanel.

CC: (none) => anaselli, matteo.pasotti

Comment 7 Colin Guthrie 2014-11-22 12:32:24 CET
(In reply to Angelo Naselli from comment #6)
> @Colin #comment 5, have you got any specification for that to read? We could
> think to try that way in manahost for adminpanel.

http://www.freedesktop.org/wiki/Software/systemd/hostnamed/

see also:

http://www.freedesktop.org/wiki/Software/systemd/#documentationfordevelopers
 and the various "On ..." links for the other daemons we should likely interface with, namely timedated and localed.
Comment 8 Angelo Naselli 2014-11-22 16:27:50 CET
Yes Col, that should be easy i tested and works!

here a perl example to retrieve in future:

use Net::DBus;
use Data::Dumper;

# gdbus introspect --system --dest org.freedesktop.hostname1 --object-path /org/freedesktop/hostname1
my $bus = Net::DBus->system;

my $service = $bus->get_service("org.freedesktop.hostname1");
my $object = $service->get_object("/org/freedesktop/hostname1");

print "Names on the bus {\n";
my $properties = $object->GetAll("org.freedesktop.hostname1");
print Dumper($properties);
$object->SetPrettyHostname("Gandalf the white", 1);
 
$properties = $object->GetAll("org.freedesktop.hostname1");
print Dumper($properties);
Comment 9 Florian Hubold 2014-11-23 13:32:33 CET
(In reply to Colin Guthrie from comment #5)
> (In reply to Florian Hubold from comment #4)
> > We should probably have a simple frontend to hostnamectl ...
> 
> Or rather we should probably have a simple frontend to the dbus service that
> hostnamectl also connects to. Writing a wrapper around a command line
> program which talks to a dbus service seems kinda wrong :)

Well, you know what I mean :p
Comment 10 Angelo Naselli 2014-12-12 22:48:51 CET
Florian manahost can now manage hostname via dbus
Comment 11 Samuel Verschelde 2015-09-21 13:20:17 CEST
Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer 
maintained, which means that it will not receive any further security or bug 
fix updates.

Package Maintainer: If you wish for this bug to remain open because you plan to 
fix it in a currently maintained version, simply change the 'version' to a later 
Mageia version.

Bug Reporter: Thank you for reporting this issue and we are sorry that we weren't 
able to fix it before Mageia 4's end of life. If you are able to reproduce it 
against a later version of Mageia, you are encouraged to click on "Version" and 
change it against that version of Mageia. If it's valid in several versions, 
select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.

Although we aim to fix as many bugs as possible during every release's lifetime, 
sometimes those efforts are overtaken by events. Often a more recent Mageia 
release includes newer upstream software that fixes bugs or makes them obsolete.

If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].

[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/
Comment 12 Marja Van Waes 2015-10-27 06:57:33 CET
As announced over a month ago, Mageia 4 changed to end-of-life (EOL) status on 2015-09-19. It is is no longer maintained, which means that it will not receive any further security or bug fix updates.

This issue may have been fixed in a later Mageia release, so, if you still see it and didn't already do so: please upgrade to Mageia 5 (or, if you read this much later than this is written: make sure you run a currently maintained Mageia version)

If you are able to reproduce it against a maintained version of Mageia, you are encouraged to 
1. reopen this bug report, by changing the "Status" from "RESOLVED - OLD" to "REOPENED"
2. click on "Version" and change it against that version of Mageia. If you know it's valid in several versions, select the highest and add MGAxTOO in whiteboard for each other valid release.
Example: it's valid in cauldron and Mageia 5, set to cauldron and add MGA5TOO.
3. give as much relevant information as possible. If you're not an experienced bug reporter and have some time: please read this page:
https://wiki.mageia.org/en/How_to_report_a_bug_properly

If you see a similar issue, but are _not_sure_ it is the same, with the same cause, then please file a new bug report and mention this one in it (please include the bug number, too). 


If you would like to help fixing bugs in the future, don't hesitate to join the
packager team via our mentoring program [1] or join the teams that fit you 
most [2].
[1] https://wiki.mageia.org/en/Becoming_a_Mageia_Packager
[2] http://www.mageia.org/contribute/

Status: NEW => RESOLVED
Resolution: (none) => OLD

Comment 13 Angelo Naselli 2015-10-27 08:39:31 CET
@Florian it's up to you... but I don't think droakhost has changed behavior, am I wrong?
Comment 14 Florian Hubold 2015-10-28 09:28:56 CET
Well, we still don't have a standalone tool offered by default (apart from manahost, that is :) ) that can easily change the hostname.

Status: RESOLVED => REOPENED
Version: 4 => Cauldron
Resolution: OLD => (none)

Comment 15 Olivier FAURAX 2022-07-16 13:48:11 CEST
Is this very old bug still valid?

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