Modify

Ticket #906 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 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:

Description

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]chaos.example.de
Input the server location [https://chaos:6789]: 
Input base Operating System for clients:
1: Redhat/Fedora/RHEL/RHAS/Centos
2: SUSE/SLES
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
subject=/C=US/ST=Illinois/L=Argonne/CN=chaos.example.de
Getting Private key
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/Init.py", line 164, in __call__
    self.init_repo()
  File "/usr/local/lib/python2.6/site-packages/Bcfg2/Server/Admin/Init.py", line 276, in init_repo
    os.makedirs(path)
  File "/usr/lib64/python2.6/os.py", 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. (;

Attachments

Change History

comment:1 Changed 12 years ago by http://fab.id.fedoraproject.org/

This was fixed in Changeset r6009

comment:2 Changed 12 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 12 years ago by desai

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

comment:4 Changed 12 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.

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.