Ticket #906 (closed enhancement: fixed)

Opened 13 years ago

Last modified 13 years ago

Repo dir overwriting should be more robust.

Reported by: m4z <[email protected]…> Owned by: desai
Priority: minor Milestone: Bcfg2 1.1.0 Release
Component: bcfg2-server Version: 1.0
Keywords: Cc:


I get a lot of tracebacks in 1.0.1; here is the first of a series of bugs reports.

chaos:~/bcfg2-1.0.1 # bcfg2-admin init
Store bcfg2 configuration in [/etc/bcfg2.conf]: 
Location of bcfg2 repository [/var/lib/bcfg2]: 
Directory /var/lib/bcfg2 exists. Overwrite? [y/N]:y
Input password used for communication verification (without echoing; leave blank for a random): 
What is the server's hostname: [chaos]
Input the server location [https://chaos:6789]: 
Input base Operating System for clients:
1: Redhat/Fedora/RHEL/RHAS/Centos
3: Mandrake
4: Debian
5: Ubuntu
6: Gentoo
7: FreeBSD
: 2

Warning: /etc/bcfg2.conf already exists. Overwrite? [y/N]: y
Generating a 1024 bit RSA private key
writing new private key to '/etc/bcfg2.key'
Signature ok
Getting Private key
Traceback (most recent call last):
  File "/usr/local/bin/bcfg2-admin", line 78, in <module>
  File "/usr/local/bin/bcfg2-admin", line 70, in main
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/", line 164, in __call__
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/", line 276, in init_repo
  File "/usr/lib64/python2.6/", line 157, in makedirs
    mkdir(name, mode)
OSError: [Errno 17] File exists: '/var/lib/bcfg2/etc'
chaos:~/bcfg2-1.0.1 #

Cosmetics: Also, note the colon in the hostname question differs from the other questions. (;


Change History

comment:1 Changed 13 years ago by

This was fixed in Changeset r6009

comment:2 Changed 13 years ago by m4z <[email protected]…>

Thanks for the many quick fixes. Two more things, though. (;

First: Just cosmetics, but now there are two colons:

"What is the server's hostname: [%s]: "

s/e:/e/ or s/e:/e?/ would be nice.

Second: As is also visible in the sample output above, changing the servers hostname (_prompt_hostname) does not change the server location suggestion (_prompt_server). It'd be less typing if it reflected this (eg. for hosts with multiple FQDNs).

comment:3 Changed 13 years ago by desai

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

comment:4 Changed 13 years ago by solj

  • Milestone changed from Bcfg2 1.2.0 Release to Bcfg2 1.1.0 Release

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


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.