app: Add debug mode

Can be used to debug an application using pdb, e.g.:
$ PYTHONPATH=src/ python -m pdb src/ovirt/node/setup/__main__.py \
                                --dry \
                                --defaults /tmp/cfg_dummy \
                                --debug

Without the switch every exception will be catched and thus not passed
to pdb.

Change-Id: Ib0bf1b3d6bb360b3dfda9bb7c604153e0f13bebc
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
valid: Fix Text validator

Needs to call the super constructor.

Change-Id: I4532ddc959821679677ccba13cba16ffa6791412
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
network: Remove calls to removed functions

Change-Id: Iaa4bc49d844dcb30ae3aa9c7accb159e4eaea35f
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
test: Add junit output for unit tests

nosetests allows the generation of junit-like xml files containing the
results. This is useful with jenkins, as jenkins can use these xml files
to monitor trends in unittests.

Change-Id: Ic6d28b83ba309c1973302c48d5658d7bb96fb46f
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
ui: Remove irritating text before opening dialogs

In the days of using less to display text on the screen we told the user
about pressing 'q' to quit. Now, in the days of using real dialogs, this
message (Press 'ESC' to quit) seems to be irritating, at first because
it's not shown within the dialog, but on e the page before, and second,
because there is already a close button on the dialog itself (in
addition to using ESC to close a dialog).

Change-Id: I8b264e02af8ea7ada10ac8f8d272763369b078bb
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Dialog class: Using button "Close" instead of "Reset"

Previously Dialog didn't offer "Close" button to quit
that dialog, also "Reset" button was unnecessary.
Now using button "Close" instead of "Reset".

Change-Id: Ifea2929a328da50493f5336d389b07202ac755b1
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=977267
Signed-off-by: hadong <hadong0720@gmail.com>
Ensure log rotation happens

Previously, we called logrotate on explicit files rather than the
main config, but these files did not include any logrotate
directives, so logs were not rotated. This fix is a kludge while
a more thorough logging solution is planned.

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=975518
Change-Id: Id3c479b81eea023d11cbc65fb1814fd886ffedc7
Signed-off-by: Ryan Barry <rbarry@redhat.com>
add ovirt-kdump service wrapper to prevent confusing errors

Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=976446
Signed-off-by: Joey Boggs <jboggs@redhat.com>
Change-Id: Ie9e362bb9ee0f96a73ca459987bf8523848ed9e6
Make FQDN validator abide by RFC1035

Check for the length of each field as well as the entire
hostname to make sure it's not too long

Change-Id: I747a29c1a15b601bf1eea364b76e56818078e80b
Signed-off-by: Ryan Barry <rbarry@redhat.com>
edit-node: make a operation option mandatory for using edit-node

rhbz#924528

Change-Id: I730db91f7953ce9d8ce630183fc0a68c40ed667a
Signed-off-by: Joey Boggs <jboggs@redhat.com>
scripts: Replace ovirt-config-password tool

The old password tool gets replaced with a rewritten version using the
new codebase.

Change-Id: I7acf7fe4782fb7cee3d493e3eb26f7c6230491d8
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Use WatchedFileHandler instead of RotatingFileHandler

Even though we just switched to RotatingFileHandler, it does not
interact well with logrotate, whereas WatchedFileHandler is
explicitly intended to deal with that use case. Additionally,
using WatchedFileHandler ensures that the logging page accurately
reflects the actual sizes of logfiles, and that our own logrotate
job performs as expected.

Change-Id: I6230b1da121a8c3711b7c09cbc8b174ee6b12032
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=976053
Signed-off-by: Ryan Barry <rbarry@redhat.com>
ovirt-node-upgrade: catch exceptions that are being skipped over

Signed-off-by: Joey Boggs <jboggs@redhat.com>
Change-Id: Iefde860477dc21ca231d5dc29d8b79ab364b2c3f
edit-node: fix some cmds to work

Previously the follow cmds didn't work when
creating post-image processing manifests:
cmd = "LC_ALL=C rpm -qa --qf '%{name}-%{version}-%{release}.'" + \
            "'%{arch} (%{SIGPGP:pgpsig})\n' | sort -u > /manifest-" + \
            "%s-%s-rpm.txt" % (timestamp, pkg)
cmd = "LC_ALL=C rpm -qa --qf '%%{sourcerpm}\n' | sort -u > " + \
            "/manifest-%s-%s-srpm.txt" % (timestamp, pkg)
cmd = "LC_ALL=C rpm -qa --qf '%%{license}\n' | sort -u > " + \
            "/manifest-%s-%s-license.txt" % (timestamp, pkg)
cmd = "rpm -q %s --qf '%%{version}-%%{release}.%%{arch}\n'" \
                  % pkg
cmd = "LC_ALL=C rpm -q %s --qf '%%{INSTALLTIME:date}\n'" \
                  % pkg

Now they can work.

Signed-off-by: hadong <hadong0720@gmail.com>
Change-Id: Ic8160c9590a3309700a11c6ba2ae1c77b9861641
pkg: Remove node-config (and references to it)

node-config seems to be unused.

Change-Id: Ibc9015c3d36db9519e1182c10f921f3fada9802e
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=969143
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
synchronize log dir with iso on boot

During an upgrade, a service could be added that logs in a new
location under /var/log/<service>.  The directory will not exist
and start/stop of that service may fail.

This patch adds logic that will examing the contents of /var/log
on the base iso and create any directories found there but
not found in the HostVG-Logging partition.

Change-Id: Ife2399c9cb1fb7eb9fd572f9214ee74f8a61a8ce
Signed-off-by: Mike Burns <mburns@redhat.com>
Add tuned configuration

* Add tuned= kernel command line option
* Add tuned python module that interacts with tuned-adm
to do all tuned configuration work
* Add TUI page that lists current tuned profiles available and
shows the currently selected one.

Change-Id: Ic1ed6db48bfeeed962f1bff656d71243281e1597
Signed-off-by: Mike Burns <mburns@redhat.com>
setup: Fix security page password validation

Previously the password validation was broken on the security page.
Now it's fixed.

Change-Id: Ib6b8ff2d44d390c36e9fddfde2c501f02d7c5012
Signed-off-by: Fabian Deutsch <fabiand@fedoraproject.org>
Workaround missing subprocess.check_output on Python 2.6

EL6 and derivatives can't use subprocess.check_output, since it
was not added until Python 2.7. Silently redirect them to the
existing ovirt.node.utils.process.pipe() function if they're on
Python 2.6

Change-Id: Ia201854707fd1300766488d8094585b90b868b3c
Signed-off-by: Ryan Barry <rbarry@redhat.com>
Merge branch 'master' into dev.litevirt