Bug 1098718 - RFE: virt-builder aliases
Summary: RFE: virt-builder aliases
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Virtualization Tools
Classification: Community
Component: libguestfs
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Richard W.M. Jones
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-05-17 16:20 UTC by Richard W.M. Jones
Modified: 2014-05-27 08:59 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-27 08:59:27 UTC
Embargoed:


Attachments (Terms of Use)

Description Richard W.M. Jones 2014-05-17 16:20:34 UTC
Description of problem:

We have guest types like 'centos-6' which mean "the latest version
of CentOS 6".  ie. Currently that installs CentOS 6.5.

Some users have asked me make available old versions of CentOS,
so we would have centos-6.0, centos-6.1, ..., centos-6.5.

To avoid breaking existing users, 'centos-6' would then become
an alias for a particular os-version, eg. centos-6 -> centos-6.5

Suggested syntax (since we are using a proper parser):

centos-6 -> centos-6.5


Version-Release number of selected component (if applicable):

libguestfs 1.27.11

Comment 1 Pino Toscano 2014-05-19 11:57:47 UTC
(In reply to Richard W.M. Jones from comment #0)
> We have guest types like 'centos-6' which mean "the latest version
> of CentOS 6".  ie. Currently that installs CentOS 6.5.
> 
> Some users have asked me make available old versions of CentOS,
> so we would have centos-6.0, centos-6.1, ..., centos-6.5.
> 
> To avoid breaking existing users, 'centos-6' would then become
> an alias for a particular os-version, eg. centos-6 -> centos-6.5

Good idea.

> Suggested syntax (since we are using a proper parser):
> 
> centos-6 -> centos-6.5

I'm not sure, where should it go like that?

I was thinking about a simplier:
  [foo]
  ...
  aliases=foo-alias bar-alias

Comment 2 Richard W.M. Jones 2014-05-19 12:08:01 UTC
I don't really have any strong preferences about this.  One
observation though: since all guest names are supposed to be
"os-version", I think we can add section names like [global]
or [aliases] without conflicting with existing guest names.

However ...

(In reply to Pino Toscano from comment #1)
> I was thinking about a simplier:
>   [foo]
>   ...
>   aliases=foo-alias bar-alias

isn't this backwards?

Comment 3 Pino Toscano 2014-05-20 08:44:16 UTC
(In reply to Richard W.M. Jones from comment #2)
> I don't really have any strong preferences about this.  One
> observation though: since all guest names are supposed to be
> "os-version", I think we can add section names like [global]
> or [aliases] without conflicting with existing guest names.

Let's see whether we can come up with a solution that leaves the section names all available to the user.

> (In reply to Pino Toscano from comment #1)
> > I was thinking about a simplier:
> >   [foo]
> >   ...
> >   aliases=foo-alias bar-alias
> 
> isn't this backwards?

I'm not sure I get you here, why having an entry declare its aliases should be backward?

Comment 4 Richard W.M. Jones 2014-05-20 09:20:09 UTC
> > (In reply to Pino Toscano from comment #1)
> > > I was thinking about a simplier:
> > >   [foo]
> > >   ...
> > >   aliases=foo-alias bar-alias
> > 
> > isn't this backwards?
> 
> I'm not sure I get you here, why having an entry declare its aliases should
> be backward?

I think this example is clearer:

  [centos-6.5]
  ... other fields ...
  alias=centos-6

which is fine.

Comment 5 Pino Toscano 2014-05-20 09:29:27 UTC
(In reply to Richard W.M. Jones from comment #4)
> > > (In reply to Pino Toscano from comment #1)
> > > > I was thinking about a simplier:
> > > >   [foo]
> > > >   ...
> > > >   aliases=foo-alias bar-alias
> > > 
> > > isn't this backwards?
> > 
> > I'm not sure I get you here, why having an entry declare its aliases should
> > be backward?
> 
> I think this example is clearer:
> 
>   [centos-6.5]
>   ... other fields ...
>   alias=centos-6
> 
> which is fine.

Yes, this is basically what I proposed too, just allowing multiple aliases for each entry, so in the example above you could have both "centos-6" and "centos" as aliases for the most recent CentOS version.

Comment 6 Pino Toscano 2014-05-27 08:59:27 UTC
This has been committed as
https://github.com/libguestfs/libguestfs/commit/e4005bd530aab62a8d86cfc7cb5db1c69ae873dd
which is in libguestfs >= 1.27.14.


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