Debian Bug report logs - #483760
ltsp-client: Generate unique hostname when reverse DNS lookup fail

version graph

Package: ltsp-client; Maintainer for ltsp-client is Debian LTSP Maintainers <team+ltsp@tracker.debian.org>; Source for ltsp-client is src:ltsp (PTS, buildd, popcon).

Reported by: Petter Reinholdtsen <pere@hungry.com>

Date: Fri, 30 May 2008 21:42:01 UTC

Severity: wishlist

Found in version ltsp/5.1.5-1

Fixed in version ltsp/5.1.44-1

Done: Vagrant Cascadian <vagrant@freegeek.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#483760; Package ltsp-client. (full text, mbox, link).


Acknowledgement sent to Petter Reinholdtsen <pere@hungry.com>:
New Bug report received and forwarded. Copy sent to LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Petter Reinholdtsen <pere@hungry.com>
To: submit@bugs.debian.org
Subject: ltsp-client: Generate unique hostname when reverse DNS lookup fail
Date: Fri, 30 May 2008 23:41:11 +0200
Package: ltsp-client
Version: 5.1.5-1
Severity: wishlist

At the moment in Etch, all the LTSP clients will have the same
hostname 'ltsp'.  This make reports generated by sitesummary almost
useless for LTSP clients.  In Lenny, I was told by Vagrant it would
look up the name in DNS, and use the reverse DNS lookup to set a
hostname.  I do the same in Etch using a script included in
debian-edu-config.  But, on a fairly large site the reverse DNS
entries are missing, and thus a lot of clients end up with the common
and useless 'ltsp' hostname.

I propose to generate a unique hostname for these hosts based on their
network MAC address of the client, like "ltsp-00:00:00:00:00:00".  It
would make it fairly easy to recognize which client was running at a
given moment in time when no reverse DNS lookup is available.

Happy hacking,
-- 
Petter Reinholdtsen




Information forwarded to debian-bugs-dist@lists.debian.org, LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#483760; Package ltsp-client. (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@freegeek.org>:
Extra info received and forwarded to list. Copy sent to LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (full text, mbox, link).


Message #10 received at 483760@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@freegeek.org>
To: Petter Reinholdtsen <pere@hungry.com>, 483760@bugs.debian.org
Subject: Re: Bug#483760: ltsp-client: Generate unique hostname when reverse DNS lookup fail
Date: Wed, 11 Jun 2008 11:23:34 -0700
On Fri, May 30, 2008 at 11:41:11PM +0200, Petter Reinholdtsen wrote:
> I propose to generate a unique hostname for these hosts based on their
> network MAC address of the client, like "ltsp-00:00:00:00:00:00".  It
> would make it fairly easy to recognize which client was running at a
> given moment in time when no reverse DNS lookup is available.

--- client/initramfs/scripts/nfs-bottom/ltsp    2007-09-14 03:05:14 +0000
+++ client/initramfs/scripts/nfs-bottom/ltsp    2008-05-30 22:16:47 +0000
@@ -4,5 +4,8 @@
 
 read HOSTNAME < /proc/sys/kernel/hostname
 if [ "${HOSTNAME}" = "(none)" ]; then
-    echo "ltsp" > /proc/sys/kernel/hostname
+    INTERFACE="$(/sbin/route -n | awk '/^0\.0\.0\.0 / { print $8 }')"
+    MAC=$(ifconfig $INTERFACE | awk '/HWaddr/ {print $5}')
+    EXTRA_NAME="$(echo $MAC | tr ':' '-')"
+    echo "ltsp$EXTRA_NAME" > /proc/sys/kernel/hostname
 fi

this patch (based on suggestions from pere) would basically work,
although i would like to figure out some way to make it optional.

using an lts.conf option would be ideal from the ltsp perspective,
though a little complicated to implement in the initramfs. might also be
able to hook into initramfs-tools conf.d ...

live well,
  vagrant




Information forwarded to debian-bugs-dist@lists.debian.org, LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#483760; Package ltsp-client. (Sun, 14 Dec 2008 10:06:02 GMT) (full text, mbox, link).


Acknowledgement sent to Άλκης Γεωργόπουλος <alkisg@gmail.com>:
Extra info received and forwarded to list. Copy sent to LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Sun, 14 Dec 2008 10:06:02 GMT) (full text, mbox, link).


Message #15 received at 483760@bugs.debian.org (full text, mbox, reply):

From: Άλκης Γεωργόπουλος <alkisg@gmail.com>
To: 483760@bugs.debian.org
Subject: Re: Bug#483760: ltsp-client: Generate unique hostname when reverse DNS lookup fail
Date: Sun, 14 Dec 2008 12:00:27 +0200
Another proposed implementation, based on the client IP:

if [ "${HOSTNAME}" = "(none)" ]; then
  . /tmp/net-*.conf
# this should be all in one line:
  echo "$IPV4ADDR.$IPV4NETMASK" | awk -F "." '{ print "ltsp" 
   (($1%(256-$5)*256+$2%(256-$6))*256+$3%(256-$7))*256+$4%(256-$8) }'
   > /proc/sys/kernel/hostname
fi

The calculations are to take into account only the part of the IP that
has zeroes on the respective subnet mask bits. The end result is that
the clients are numbered from ltsp0 to ltsp(#maxclients-1).

In my opinion, those 2 proposed implementations (mac and ip based) are
simple enough and cover most of the needs.
So one of them could be the default, and the other one could be selected
based on some lts.conf entry.

Cheers,
Alkis Georgopoulos





Information forwarded to debian-bugs-dist@lists.debian.org, LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#483760; Package ltsp-client. (Mon, 29 Dec 2008 19:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to Vagrant Cascadian <vagrant@freegeek.org>:
Extra info received and forwarded to list. Copy sent to LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>. (Mon, 29 Dec 2008 19:21:04 GMT) (full text, mbox, link).


Message #20 received at 483760@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@freegeek.org>
To: 483760-submitter@bugs.debian.org, 483760@bugs.debian.org
Subject: ltsp-client: Generate unique hostname when reverse DNS lookup fail
Date: Mon, 29 Dec 2008 11:17:00 -0800
tags 483760 pending
thanks

committed upstream, should upload to debian experimental soon:

  http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/1059

live well,
  vagrant




Tags added: pending Request was from Vagrant Cascadian <vagrant@freegeek.org> to control@bugs.debian.org. (Mon, 29 Dec 2008 19:21:05 GMT) (full text, mbox, link).


Message sent on to Petter Reinholdtsen <pere@hungry.com>:
Bug#483760. (Mon, 29 Dec 2008 19:21:11 GMT) (full text, mbox, link).


Reply sent to Vagrant Cascadian <vagrant@freegeek.org>:
You have taken responsibility. (Tue, 30 Dec 2008 18:39:12 GMT) (full text, mbox, link).


Notification sent to Petter Reinholdtsen <pere@hungry.com>:
Bug acknowledged by developer. (Tue, 30 Dec 2008 18:39:12 GMT) (full text, mbox, link).


Message #30 received at 483760-close@bugs.debian.org (full text, mbox, reply):

From: Vagrant Cascadian <vagrant@freegeek.org>
To: 483760-close@bugs.debian.org
Subject: Bug#483760: fixed in ltsp 5.1.44-1
Date: Tue, 30 Dec 2008 18:17:04 +0000
Source: ltsp
Source-Version: 5.1.44-1

We believe that the bug you reported is fixed in the latest version of
ltsp, which is due to be installed in the Debian FTP archive:

ltsp-client-builder_5.1.44-1_all.udeb
  to pool/main/l/ltsp/ltsp-client-builder_5.1.44-1_all.udeb
ltsp-client-core_5.1.44-1_i386.deb
  to pool/main/l/ltsp/ltsp-client-core_5.1.44-1_i386.deb
ltsp-client_5.1.44-1_i386.deb
  to pool/main/l/ltsp/ltsp-client_5.1.44-1_i386.deb
ltsp-server-standalone_5.1.44-1_all.deb
  to pool/main/l/ltsp/ltsp-server-standalone_5.1.44-1_all.deb
ltsp-server_5.1.44-1_all.deb
  to pool/main/l/ltsp/ltsp-server_5.1.44-1_all.deb
ltsp_5.1.44-1.diff.gz
  to pool/main/l/ltsp/ltsp_5.1.44-1.diff.gz
ltsp_5.1.44-1.dsc
  to pool/main/l/ltsp/ltsp_5.1.44-1.dsc
ltsp_5.1.44.orig.tar.gz
  to pool/main/l/ltsp/ltsp_5.1.44.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 483760@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Vagrant Cascadian <vagrant@freegeek.org> (supplier of updated ltsp package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 30 Dec 2008 08:59:39 -0800
Source: ltsp
Binary: ltsp-server ltsp-server-standalone ltsp-client-core ltsp-client ltsp-client-builder
Architecture: source all i386
Version: 5.1.44-1
Distribution: experimental
Urgency: low
Maintainer: LTSP Debian/Ubuntu Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>
Changed-By: Vagrant Cascadian <vagrant@freegeek.org>
Description: 
 ltsp-client - LTSP client environment
 ltsp-client-builder - build an LTSP environment in the installer target (udeb)
 ltsp-client-core - LTSP client environment
 ltsp-server - basic LTSP server environment
 ltsp-server-standalone - complete LTSP server environment
Closes: 483760
Changes: 
 ltsp (5.1.44-1) experimental; urgency=low
 .
   * new upstream version:
     - fix bug in xorg.conf generation by using a more generic awk regex. Thanks
       to Gideon Romm and Alkis Georgopoulos.
     - if no hostname is defined, generate a hostname based on ip or mac
       address, defaulting to ip address. Thanks to Petter Reinholdtsen and
       Alkis Georgopoulos. (Closes: #483760)
 .
   * ltsp-client-builder: display more steps in progress bar so that it doesn't
     immediately appear to be frozen at 50%
 .
   * ltsp-server.install: install extra plugins from a dir rather than
     specifying each plugin individually.
 .
   * drop 099-mount-cdrom plugin, as it is shipped upstream now
Checksums-Sha1: 
 5ed8018e027bec2b07dd06ad569d6bd1b16d27e7 1550 ltsp_5.1.44-1.dsc
 481076e59f2f63c3c09627718f8fa2830d87a381 329339 ltsp_5.1.44.orig.tar.gz
 41c8af6d76aff984531e4371d27e66074c3ac941 68036 ltsp_5.1.44-1.diff.gz
 66fb42f7cbf0437e54011c6423e3535e4e177f9b 99308 ltsp-server_5.1.44-1_all.deb
 b7167d3d80455310701fabaf3132216b9eceb69b 41834 ltsp-server-standalone_5.1.44-1_all.deb
 75712a6d0f71fcc1098c32a27704c9ee7893aeec 7866 ltsp-client-builder_5.1.44-1_all.udeb
 e38f726c8351024c6c2561fee652700f298c5255 90976 ltsp-client-core_5.1.44-1_i386.deb
 184831b68969c3c1660b8587aa1eb2687a2907fd 41200 ltsp-client_5.1.44-1_i386.deb
Checksums-Sha256: 
 63743ebffab7dcf2880b29551bc7b73bd12535a02d5e3f07e5f2d06289cfdd0f 1550 ltsp_5.1.44-1.dsc
 8f8e79db14c57dbb966f5e7005823c878e7f311949ff072199bd2158afe62250 329339 ltsp_5.1.44.orig.tar.gz
 a158476052e284767193aa847fdb4edb81c9837237035394e23c99821653fb5c 68036 ltsp_5.1.44-1.diff.gz
 87909a20843f1f9f8b0c394deb5a13ea4538578067f8388b20ede370654dd6c3 99308 ltsp-server_5.1.44-1_all.deb
 e09f0c8254a1f56aeb7d13938701f3075440ed36f85c77aa124edd15cec4e4e6 41834 ltsp-server-standalone_5.1.44-1_all.deb
 80fc45c147decae66b436efd753a35cfd8291c41bbb42d2e3f1448e591a06414 7866 ltsp-client-builder_5.1.44-1_all.udeb
 44015af6f43b4d68e6248a3ff70c8bd87259469ac1ca6341d3b96953af24e574 90976 ltsp-client-core_5.1.44-1_i386.deb
 a161b532dd067607fdbfd7eba98043ed6b2440602f27cbfe9ffe01892504612d 41200 ltsp-client_5.1.44-1_i386.deb
Files: 
 69f6fe6063abbcb7b072377d335d946c 1550 misc extra ltsp_5.1.44-1.dsc
 1773c5a9ca0487d91bcfdfda8ddec089 329339 misc extra ltsp_5.1.44.orig.tar.gz
 0177d573b8fb6e181685dfead5c094d3 68036 misc extra ltsp_5.1.44-1.diff.gz
 28cf55050ab3f42bd92fc23bcd8b430c 99308 misc extra ltsp-server_5.1.44-1_all.deb
 58511e4451420043ec69cae942e24d6e 41834 misc extra ltsp-server-standalone_5.1.44-1_all.deb
 291dd92ba3340d8f01efd3955e927f26 7866 debian-installer extra ltsp-client-builder_5.1.44-1_all.udeb
 37b518b6149c8de2f77b924b98739c9d 90976 misc extra ltsp-client-core_5.1.44-1_i386.deb
 429d55a5089991c1969127319162317e 41200 misc extra ltsp-client_5.1.44-1_i386.deb
Package-Type: udeb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklaY0UACgkQlPc63BPWGplkbgCgn08mLF2trZI7lR33U3nhi/Km
fxUAn3e1YQo8Sw4AxqlOn2dgvUrz1pPp
=2c1L
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 26 Mar 2009 07:38:47 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sat Jul 1 13:20:41 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.