[Katello 2.2 RC3] How to perform a incremental update with one Package?

Can anyone give me the Hammer CLI Syntax for performing a single package
incremental update?
I added 1 package for testing to my EPEL-6 Product, but now I´m stucked at
"hammer content-view version incremental-update" command…

[root@katello ~]# hammer product list --organization CESYSTEMS
—|----------------|-------------|--------------|--------------|-----------

ID NAME DESCRIPTION ORGANIZATION REPOSITORIES SYNC STATE
9 EPEL-6 CESYSTEMS 6 finished

[root@katello ~]# hammer repository list --organization CESYSTEMS
----|------------------------------------------|----------------|--------------|
ID | NAME | PRODUCT | CONTENT

TYPE
148

>

[root@katello ~]# hammer content-view list --organization CESYSTEMS
----------------|---------------------------|--------------------------------------|-----------|---------------------------------------------------------------------------------
CONTENT VIEW ID | NAME | LABEL
> COMPOSITE | REPOSITORY IDS
----------------|---------------------------|--------------------------------------|-----------|----------------

5 | Yum | Standard
> > 148, 160, 163, 149, 164, 161, 155, 150, 151, 156, 152,
157, 158, 153, 154, 15

[root@katello ~]# hammer content-view version list
—|-------------------------------|---------|-----------------------

ID NAME VERSION LIFECYCLE ENVIRONMENTS
23 Yum 7.0 7.0 Library, Test, Prod

[root@katello ~]# hammer environment list
—|--------------------------------

ID NAME
15 DRAGONS_LAIR
9 KT_CESYSTEMS_Library_Docker_3
2 KT_CESYSTEMS_Library_Empty_4
12 KT_CESYSTEMS_Library_Puppet_7
6 KT_CESYSTEMS_Library_Standard_5
11 KT_CESYSTEMS_Prod_Docker_3
4 KT_CESYSTEMS_Prod_Empty_4
14 KT_CESYSTEMS_Prod_Puppet_7
8 KT_CESYSTEMS_Prod_Standard_5
10 KT_CESYSTEMS_Test_Docker_3
3 KT_CESYSTEMS_Test_Empty_4
13 KT_CESYSTEMS_Test_Puppet_7
7 KT_CESYSTEMS_Test_Standard_5
1 production

[root@katello ~]# hammer package info --id
66e12cbd-0478-4ed6-8180-4ea90d6e58ab
ID: 66e12cbd-0478-4ed6-8180-4ea90d6e58ab
Name: 389-admin

The following should update the content view version with ID 23 with the
package having the UUID of 66e12cbd-0478-4ed6-8180-4ea90d6e58ab

hammer content-view version incremental-update --content-view-version-id 23
–package-ids 66e12cbd-0478-4ed6-8180-4ea90d6e58ab

Eric

··· On Sun, Apr 26, 2015 at 1:05 PM, wrote:

Can anyone give me the Hammer CLI Syntax for performing a single package
incremental update?
I added 1 package for testing to my EPEL-6 Product, but now I´m stucked at
"hammer content-view version incremental-update" command…

[root@katello ~]# hammer product list --organization CESYSTEMS

—|----------------|-------------|--------------|--------------|-----------
ID | NAME | DESCRIPTION | ORGANIZATION | REPOSITORIES | SYNC
STATE

—|----------------|-------------|--------------|--------------|-----------
9 | EPEL-6 | | CESYSTEMS | 6 | finished

[root@katello ~]# hammer repository list --organization CESYSTEMS

----|------------------------------------------|----------------|--------------|
ID | NAME | PRODUCT | CONTENT
TYPE |

----|------------------------------------------|----------------|--------------|
148 | Base_RPMs_x86_64 | EPEL-6 | yum
>

[root@katello ~]# hammer content-view list --organization CESYSTEMS

----------------|---------------------------|--------------------------------------|-----------|---------------------------------------------------------------------------------
CONTENT VIEW ID | NAME | LABEL
> COMPOSITE | REPOSITORY IDS

----------------|---------------------------|--------------------------------------|-----------|----------------

5 | Yum | Standard
> > 148, 160, 163, 149, 164, 161, 155, 150, 151, 156,
152, 157, 158, 153, 154, 15

[root@katello ~]# hammer content-view version list
—|-------------------------------|---------|-----------------------

ID NAME VERSION LIFECYCLE ENVIRONMENTS
23 Yum 7.0 7.0 Library, Test, Prod

[root@katello ~]# hammer environment list
—|--------------------------------

ID NAME
15 DRAGONS_LAIR
9 KT_CESYSTEMS_Library_Docker_3
2 KT_CESYSTEMS_Library_Empty_4
12 KT_CESYSTEMS_Library_Puppet_7
6 KT_CESYSTEMS_Library_Standard_5
11 KT_CESYSTEMS_Prod_Docker_3
4 KT_CESYSTEMS_Prod_Empty_4
14 KT_CESYSTEMS_Prod_Puppet_7
8 KT_CESYSTEMS_Prod_Standard_5
10 KT_CESYSTEMS_Test_Docker_3
3 KT_CESYSTEMS_Test_Empty_4
13 KT_CESYSTEMS_Test_Puppet_7
7 KT_CESYSTEMS_Test_Standard_5
1 production

[root@katello ~]# hammer package info --id
66e12cbd-0478-4ed6-8180-4ea90d6e58ab
ID: 66e12cbd-0478-4ed6-8180-4ea90d6e58ab
Name: 389-admin


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Some progress, but I´m still failing :frowning:

with your command:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37
An error occurred incrementally updating the content view:
Error: option '–environment-ids' is required

I added "–environment-ids=1,2,3", but I´m not sure if its correct
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3
An error occurred incrementally updating the content view:
Error: option '–id' is required

And now I´m stucked again:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=5
An error occurred incrementally updating the content view:
Couldn't find Katello::ContentViewVersion with id=5

thx,
Christian

Some progress, but I´m still failing :frowning:

with your command:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37
An error occurred incrementally updating the content view:
Error: option '–environment-ids' is required

I added "–environment-ids=1,2,3", but I´m not sure if its correct
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3
An error occurred incrementally updating the content view:
Error: option '–id' is required

And now I´m stucked again:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=5
An error occurred incrementally updating the content view:
Couldn't find Katello::ContentViewVersion with id=5

thx,
Christian

Substitute --content-view-version-id with id, e.g.

hammer content-view version incremental-update --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=23

Eric

··· On Mon, Apr 27, 2015 at 11:03 AM, wrote:

Some progress, but I´m still failing :frowning:

with your command:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37
An error occurred incrementally updating the content view:
Error: option ‘–environment-ids’ is required

I added “–environment-ids=1,2,3”, but I´m not sure if its correct
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3
An error occurred incrementally updating the content view:
Error: option ‘–id’ is required

And now I´m stucked again:
[root@katello modules]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=5
An error occurred incrementally updating the content view:
Couldn’t find Katello::ContentViewVersion with id=5

thx,
Christian


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Eric, it´s still not working…

[root@katello pxelinux.cfg]# hammer content-view version incremental-update
–package-ids 2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3
–id=23
An error occurred incrementally updating the content view:
Content View Version 23 not in all specified environments Library

[root@katello pxelinux.cfg]# hammer content-view version incremental-update
–content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=23
An error occurred incrementally updating the content view:
Content View Version 23 not in all specified environments Library

BTW, can you also have a short look for some other issues i faced at:
https://groups.google.com/forum/#!topic/foreman-users/u538_xZ7cTo
https://groups.google.com/forum/#!topic/foreman-users/phuI9bscfew

thx,
Christian

You double checked that the version with ID 23 is actually in Library? (not
in the archive). This command says go update Version '23' with this package
and create a minor version bump (from say 1.0 to 1.1) and ensure that this
new minor version exists in the environments you specified. So the version
has to exist in the environments you are wanting to update it in.

Eric

··· On Tue, Apr 28, 2015 at 12:11 PM, wrote:

Hi Eric, it´s still not working…

[root@katello pxelinux.cfg]# hammer content-view version
incremental-update --package-ids 2bc3e146-754d-41cf-a560-4d18c21a2e37
–environment-ids=1,2,3 --id=23
An error occurred incrementally updating the content view:
Content View Version 23 not in all specified environments Library

[root@katello pxelinux.cfg]# hammer content-view version
incremental-update --content-view-version-id 23 --package-ids
2bc3e146-754d-41cf-a560-4d18c21a2e37 --environment-ids=1,2,3 --id=23
An error occurred incrementally updating the content view:
Content View Version 23 not in all specified environments Library

BTW, can you also have a short look for some other issues i faced at:
https://groups.google.com/forum/#!topic/foreman-users/u538_xZ7cTo
https://groups.google.com/forum/#!topic/foreman-users/phuI9bscfew

thx,
Christian


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Hi Eric, thanks for pointing me to the right direction, the
"–environment-ids" is in my case 2,3,4 instead of 1,2,3, but now it looks
that I´m facing an old bug from
https://bugzilla.redhat.com/show_bug.cgi?id=1200571 (see Comment#19 from
Justin), I will later on put the fix from
https://github.com/Katello/hammer-cli-katello/pull/290 and perform some
sanity, will kepp you updated when I have the results…

[root@katello ~]# hammer content-view version incremental-update
–package-ids 82ba8ede-99f7-4029-82b7-0a1e2057f6b8 --environment-ids=2,3,4
–id=23
An error occurred incrementally updating the content view:
undefined local variable or method `resolve_dependencies' for
#<Actions::Katello::ContentViewVersion::IncrementalUpdate:0x007f766582bda0>Code
hier eingeben…

Thanks,
Christian

The resolve_dependencies error is fixed and in the 2.2 branch but isn't in
the current RC. It will be included as part of the final release. If you
are interested the commit is:

https://github.com/Katello/katello/commit/b8e7c33b73a153ae22f83e7fa74af786bfadf051

Eric

··· On Wed, Apr 29, 2015 at 1:21 AM, wrote:

Hi Eric, thanks for pointing me to the right direction, the
“–environment-ids” is in my case 2,3,4 instead of 1,2,3, but now it looks
that I´m facing an old bug from
https://bugzilla.redhat.com/show_bug.cgi?id=1200571 (see Comment#19 from
Justin), I will later on put the fix from
https://github.com/Katello/hammer-cli-katello/pull/290 and perform some
sanity, will kepp you updated when I have the results…

[root@katello ~]# hammer content-view version incremental-update
–package-ids 82ba8ede-99f7-4029-82b7-0a1e2057f6b8 --environment-ids=2,3,4
–id=23
An error occurred incrementally updating the content view:
undefined local variable or method `resolve_dependencies’ for
#Actions::Katello::ContentViewVersion::IncrementalUpdate:0x007f766582bda0Code
hier eingeben…

Thanks,
Christian


You received this message because you are subscribed to the Google Groups
“Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

Thank you very much, it works now perfectly !!!

Bringing back to life an old thread…

Attempting an incremental update of a Content View Version with Katello
2.3, and hitting some issues.

$ hammer content-view version list --organization "Our Org" --content-view
CentOS-6
—|---------------|---------|-----------------------

ID NAME VERSION LIFECYCLE ENVIRONMENTS
47 CentOS-6 34.0 34.0 Staging, Library
46 CentOS-6 33.0 33.0
40 CentOS-6 27.0 27.0 Live
--------------- --------- -----------------------

$ hammer -u johnb environment list
—|----------------------------------------

ID NAME
6 KT_Our_Org_Library_CentOS_6_4
14 KT_Our_Org_Live_CentOS_6_4
13 KT_Our_Org_Staging_CentOS_6_4
1 production
----------------------------------------

$ hammer content-view version incremental-update --packages
bind-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-chroot-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-devel-9.8.2-0.37.rc1.el6_7.4.i686.rpm,bind-devel-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-libs-9.8.2-0.37.rc1.el6_7.4.i686.rpm,bind-libs-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-sdb-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-utils-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm
–environment-ids 6 --content-view-version-id 47
An error occurred incrementally updating the content view:
Error: Could not find package, please set one of options --packages,
–package-ids.

So, the help for 'incremental-update' suggests --packages should work, but
it doesn't…so, moving to package UUIDs:

$ hammer content-view version incremental-update --package-ids
3ce654d8-b1b5-4d4b-9b59-146e47c90972,63a5758b-9fc6-4c27-aee6-1b4762de1710,80432db1-f31e-4ef2-a0d6-c5bee472a4c8,00a70afd-0729-427b-9361-d87da0f09f06,e45d4d0e-79fe-47bf-bed8-7e152b2584f9,fbc5aa0f-cd51-4b18-b2bf-3179fce85231,348e48f4-0d80-4fa2-a012-e4c899f808b4,42ea1ddc-b3c9-4fd7-92cd-f2c40bc00521
–environment-ids 6 --content-view-version-id 47
An error occurred incrementally updating the content view:
Couldn't find Katello::ContentViewVersion without an ID

No ID? But I specified --content-view-version-id. OK, so based on this
thread I tried --id instead:

$ hammer content-view version incremental-update --package-ids
3ce654d8-b1b5-4d4b-9b59-146e47c90972,63a5758b-9fc6-4c27-aee6-1b4762de1710,80432db1-f31e-4ef2-a0d6-c5bee472a4c8,00a70afd-0729-427b-9361-d87da0f09f06,e45d4d0e-79fe-47bf-bed8-7e152b2584f9,fbc5aa0f-cd51-4b18-b2bf-3179fce85231,348e48f4-0d80-4fa2-a012-e4c899f808b4,42ea1ddc-b3c9-4fd7-92cd-f2c40bc00521
–environment-ids 6 --id 47
An error occurred incrementally updating the content view:
Error: Unrecognised option '–id'

See: 'hammer content-view version incremental-update --help'

So, what intricacy in the CLI am I missing?

Cheers,

John

P.S. One other thing, the help suggests you can pass "–environments", but
this doesn't appear to work either:

$ hammer content-view version incremental-update --packages
bind-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-chroot-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-devel-9.8.2-0.37.rc1.el6_7.4.i686.rpm,bind-devel-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-libs-9.8.2-0.37.rc1.el6_7.4.i686.rpm,bind-libs-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-sdb-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm,bind-utils-9.8.2-0.37.rc1.el6_7.4.x86_64.rpm
–environments Library --content-view-version-id 47
An error occurred incrementally updating the content view:
Error: option '–environment-ids' is required

See: 'hammer content-view version incremental-update --help'