Modify

Ticket #912 (closed enhancement: worksforme)

Opened 12 years ago

Last modified 8 years ago

bcfg2-admin pull tracebacks and sparse documentation

Reported by: m4z <[email protected]…> Owned by: desai
Priority: minor Milestone:
Component: bcfg2-client Version:
Keywords: Cc:

Description

(This is version 1.0.1)

When called without or with too few arguments, bcfg2-admin pull cries.

chaos:~ # bcfg2-admin pull
Traceback (most recent call last):
  File "/usr/local/bin/bcfg2-admin", line 78, in <module>
    main()
  File "/usr/local/bin/bcfg2-admin", line 70, in main
    mode(args[1:])
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/Pull.py", line 46, in __call__
    self.PullEntry(gargs[0], gargs[1], gargs[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2))
IndexError: list index out of range

chaos:~ # bcfg2-admin pull chaos
Traceback (most recent call last):
  File "/usr/local/bin/bcfg2-admin", line 78, in <module>
    main()
  File "/usr/local/bin/bcfg2-admin", line 70, in main
    mode(args[1:])
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/Pull.py", line 46, in __call__
    self.PullEntry(gargs[0], gargs[1], gargs[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2))
IndexError: list index out of range

chaos:~ # bcfg2-admin pull chaos foo
Traceback (most recent call last):
  File "/usr/local/bin/bcfg2-admin", line 78, in <module>
    main()
  File "/usr/local/bin/bcfg2-admin", line 70, in main
    mode(args[1:])
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/Pull.py", line 46, in __call__
    self.PullEntry(gargs[0], gargs[1], gargs[f5e4281313ff9004be488e420f90d5fe413bb5c1] (SVN r2))
IndexError: list index out of range

chaos:~ # bcfg2-admin pull i have no clue
Unable to build entry. Do you have a statistics plugin enabled?

It would be nice if it displayed required parameters and an usage example instead.

The last is also true for the man page: If I wear my newbie hat, I have no idea what <entry-type> and <entry-name> could be. There are examples in QuickStart2 that helped me figure it out, but it would be nice not to have to rely on a machine with internet access.

Attachments

Change History

comment:1 follow-up: ↓ 2 Changed 12 years ago by m4z <[email protected]…>

Somewhat related...

Another doc issue with [QuickStart2]: It is (afaik) the only place where an example usage of "bcfg2-admin pull" is used, and it is mentioned that the items are "pulled out of the statistics", but there is no explanation that statistics need to be explicitly enabled or how to do so.

So, for completeness:

  • add "Statistics" to the "Plugins" line of bcfg2.conf and restart the server
  • after a client has run (for example, with "bcfg2 -enqv"), the server has all the clients data and you can use "bcfg2-admin pull <client-name> <entry-type> <entry-name>" (like in the example in [QuickStart2]).

Because I didn't have the time to look into it yet, I'm still a bit clueless about what entry-types are possible - will pulling an entry-type "Package" create a Package entry somewhere? Will it not work at all?

Also, bcfg2-admin pull should be a bit more verbose.

chaos:~ # bcfg2-admin pull someclient.example.org Package python-devel
Got wrong numbers of matching generators for entry:[]

Does this mean I'm using it wrong (because you can't pull Package entries OR because in this one case something is wrong with the package) or something I didn't cause is wrong?

comment:2 in reply to: ↑ 1 Changed 12 years ago by m4z <[email protected]…>

Replying to m4z <[email protected]…>:

So, for completeness:

  • add "Statistics" to the "Plugins" line of bcfg2.conf and restart the server
  • after a client has run (for example, with "bcfg2 -enqv"), the server has all the clients data and you can use "bcfg2-admin pull <client-name> <entry-type> <entry-name>" (like in the example in [QuickStart2]).

That is wrong, mea culpa. Now that I have a way to push stuff with solj's help, I'll try to update/expand the docs about the Stats/Reports? and Pulling over the next few weeks.

comment:3 Changed 12 years ago by m4z <[email protected]…>

Another thing: bcfg-admin pull only seems to work *after* you have at least one version of the config in your repository. So for example in cases where you have no direct ssh/scp option between server and client and want to include your client on the server, pull does not help you. You still have to get the (initial) configs to the server somehow.

A quick hack *might* be to create the directory structure and an empty/short file on the server and then pull the real config, but I have not tested this. (Only creating the directory structure does not work).

comment:4 Changed 12 years ago by solj

  • Status changed from new to closed
  • Resolution set to worksforme

It looks like this is fixed in trunk:

[[email protected]] ~ # bcfg2-admin pull
Integrate configuration information from clients into the server repository

bcfg2-admin pull [-v] [-f][-I] [-s]<client> <entry type> <entry name>

[[email protected]] ~ # bcfg2-admin pull test
Integrate configuration information from clients into the server repository

bcfg2-admin pull [-v] [-f][-I] [-s]<client> <entry type> <entry name>

comment:5 Changed 8 years ago by Thomashinc

  • Version 1.0 deleted
  • Milestone Bcfg2 1.2.0 Release deleted

test, test, simply test )

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.