Unable to look up a node based on mac address

Bug #1027154 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Raphaël Badin
maas (Ubuntu)
Fix Released
High
Unassigned
Quantal
Fix Released
High
Unassigned

Bug Description

the most common piece of information that uniquely (mostly uniquely) identifies a system is mac address.
If someone was going to perform updates to the systems in maas, they very likely would want to query by the mac address.

This was discussed in #maas along with the idea of using CNAME for human-friendly name and then on maas-devel under "Re: Strategy regarding DNS and static DHCP leases"

ProblemType: Bug
DistroRelease: Ubuntu 12.10
Package: maas 0.1+bzr745+dfsg-0ubuntu2 [modified: usr/share/pyshared/twisted/plugins/maasps.py var/lib/cobbler/kickstarts/maas-enlist.preseed var/lib/cobbler/snippets/maas_proxy]
ProcVersionSignature: User Name 3.5.0-4.4-generic 3.5.0-rc6
Uname: Linux 3.5.0-4-generic x86_64
ApportVersion: 2.3-0ubuntu4
Architecture: amd64
Date: Fri Jul 20 16:19:05 2012
PackageArchitecture: all
ProcEnviron:
 TERM=screen
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
RelatedPackageVersions:
 python-django-maas 0.1+bzr745+dfsg-0ubuntu2
 apparmor 2.8.0-0ubuntu1
SourcePackage: maas
UpgradeStatus: No upgrade log present (probably fresh install)
modified.conffile..etc.maas.import.isos: [modified]
modified.conffile..etc.maas.maas.local.settings.py: [modified]
modified.conffile..etc.maas.pserv.yaml: [modified]
modified.conffile..etc.maas.txlongpoll.yaml: [modified]
mtime.conffile..etc.maas.import.isos: 2012-07-19T02:41:38.053582
mtime.conffile..etc.maas.maas.local.settings.py: 2012-07-19T17:13:05.403924
mtime.conffile..etc.maas.pserv.yaml: 2012-07-19T02:41:08.165582
mtime.conffile..etc.maas.txlongpoll.yaml: 2012-07-19T02:41:21.965582

Related branches

Revision history for this message
Scott Moser (smoser) wrote :
Revision history for this message
Raphaël Badin (rvb) wrote :

I see two possible solutions to that problem:
a) we could add a "lookup" method to the API. The method would return a list of system IDs from a set of criteria (mac adress would be one of the possible criteria).
b) or, if we want to promote the mac address as an identifier, we could allow the mac to be used as an identifier when calling the API: e.g. the definition of the API url for a node handler would be: r'nodes/(?P<system_id_or_mac_address>[\w\-]+)/$'
Given the fact that the system id is auto-generated (and UUID-based) and that the mac address has a well defined format, there is no risk of conflict.

Changed in maas:
importance: Undecided → High
status: New → Triaged
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Can you explain why is this needed please? (so that I can set priority appropriately)

summary: - need way to get system based on mac address
+ Unable to look up a node based on mac address
Changed in maas:
status: Triaged → Incomplete
Revision history for this message
Julian Edwards (julian-edwards) wrote :

To clarify, why would someone "very likely would want to query by the mac address". What's the use case?

Thanks.

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 1027154] Re: Unable to look up a node based on mac address

On Mon, Jul 23, 2012 at 11:50 AM, Julian Edwards
<email address hidden> wrote:
> To clarify, why would someone "very likely would want to query by the
> mac address". What's the use case?

If they are staring at a rack full of hardware, one of which has a
fault light lit, the only data they have at hand is the MAC address of
the ethernet card, which is (for servers) often printed on the card,
for exactly this reason.

-Rob

Revision history for this message
Scott Moser (smoser) wrote :

On Mon, 23 Jul 2012, Robert Collins wrote:

> On Mon, Jul 23, 2012 at 11:50 AM, Julian Edwards
> <email address hidden> wrote:
> > To clarify, why would someone "very likely would want to query by the
> > mac address". What's the use case?
>
> If they are staring at a rack full of hardware, one of which has a
> fault light lit, the only data they have at hand is the MAC address of
> the ethernet card, which is (for servers) often printed on the card,
> for exactly this reason.

Right, and if there is a database of information about systems, then it
contains MAC addresses.

The other thing is that if maas is not in charge of the dhcp and they're
doing static-dhcp, then they clearly *do* have a MAC address to system
database somewhere already.

basically, MAC is a unique id for a system that people already have and
use, and as Robert said, is often actually on a sticker on the hardware.
(ignore the known fact that there duplicate macs exist).

Revision history for this message
Julian Edwards (julian-edwards) wrote :

Great, thanks guys.

Raphaël Badin (rvb)
Changed in maas:
status: Incomplete → Triaged
Revision history for this message
Raphaël Badin (rvb) wrote :

I've added a filter to the 'list' API method: /api/1.0/nodes/?op=list&mac_address=<MAC1>&mac_address=<MAC2>.

Changed in maas:
status: Triaged → Fix Released
assignee: nobody → Raphaël Badin (rvb)
James Page (james-page)
Changed in maas (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in maas (Ubuntu Quantal):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.