perfsonar / perl-shared

Shared libraries used by perl packages and referenced as a submodule in many git repos
Apache License 2.0
7 stars 3 forks source link

Toolkit may incorrectly detect auto updates as disabled #3

Closed apertome closed 9 years ago

apertome commented 9 years ago

In some cases, the Toolkit may incorrectly detect that auto updates are disabled, even if they are enabled.

Worked through this with Ivan, who reported the issue, and tracked it down to the webservice returning "auto_updates": 0

rather than 1, so this is a bug in the webservice or backend.

Output of /etc/init.d/yum-cron status

returns Nightly yum update is enabled.

So the code should detect it correctly. So far, I have been unable to reproduce or determine why it's failing.

apertome commented 9 years ago

Ivan saw this behavior on a fullinstall of 3.4.1 that was updated to 3.5RC2, in a VM environment.

apertome commented 9 years ago

Ivan states nothing related to yum-cron in /var/log/httpd/ssl_error_log when trying to view the page

also ls -l /etc/init.d/yum-cron` shows -rwxr-xr-x 1 root root 1903 Jul 24 12:27 /etc/init.d/yum-cron

So the permissions look correct.

igarny commented 9 years ago

I really have no idea, what breaks it.

I have made this test:

!/usr/bin/perl -w

use strict; use warnings;

our $VERSION = 3.3;

=head1 NAME

perfSONAR_PS::Utils::Host

=head1 DESCRIPTION

A module that provides functions for querying information about the host on which the application is running.

=head1 API

=cut

use base 'Exporter'; use Params::Validate qw(:all); use Log::Log4perl qw(get_logger);

use Net::Interface qw/mac_bin2hex/; use Net::CIDR; use Net::IP; use Data::Validate::IP qw(is_ipv4);

use Sys::Statistics::Linux;

my $logger = get_logger(PACKAGE);

my ($self) = @_;

my $enabled = "enabled";

my $result = /etc/init.d/yum-cron status;

if(index($result, $enabled) != -1){ print 1; }else{ print 0; }

And the result is 1, which is the expected value

sowmyab commented 9 years ago

I am unable to reproduce this issue. I tested both fresh install and upgrade and the auto_updates was working as expected in both cases.

igarny commented 9 years ago

I have reinstalled the whole toolkit following an upgrade from 3.4.2 full install, and can't reproduce the issue again. Best regards, Ivan

apertome commented 9 years ago

Closing for now, if we get other reports, we can reopen.