[Bug 1462495] Re: Init file does not respect the LSB spec.

2015-06-08 Thread Jorge Niedbalski
-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1462495

Title:
  [sru] Init file does not respect the LSB spec.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1462495] Re: Init file does not respect the LSB spec.

2015-06-08 Thread Jorge Niedbalski
** Description changed:

  [Environment]
  
  Trusty 14.04.2
  
  [Description]
  
  Looking in the /etc/init.d/haproxy script, particularly the stop method,
  is returning 4 in case of the pidfile doesn't exists.
  
   /bin/kill $pid || return 4.
  
  According to the spec that means 'insufficient privileges' which is not 
correct. This is causing pacemaker and other
  system monitoring tools to fail because it doesn't complains with LSB.
  
  An example:
  
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: 
glance02-res_glance_haproxy_monitor_5000:22 [ haproxy dead, but 
/var/run/haproxy.pid exists.\n ]
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: LRM 
operation res_glance_haproxy_stop_0 (call=33, rc=4, cib-update=19, 
confirmed=true) insufficient privileges
  
  Reference:
  
  haproxy_stop()
  {
  if [ ! -f $PIDFILE ] ; then
  # This is a success according to LSB
  return 0
  fi
  for pid in $(cat $PIDFILE) ; do
  /bin/kill $pid || return 4
  done
  rm -f $PIDFILE
  return 0
  }
  
+ [Impact]
+ 
+ * Pacemaker or any other system monitoring tool that relies
+ on a proper exit code could fail as this doesn't complains with LSB.
+ 
+ [Test Case]
+ 
+ * Stop/Start haproxy on Trusty/Utopic and check exit code.
+ 
+ $ sudo service haproxy stop | echo $?
+ 
+ 
+ [Regression Potential] 
+ 
+ * If any application or shell script is relying on a wrong exit code
+ 4 , then it could be affected by this change.
+ 
  [Proposed solution]
  
  Backport the current devel (wily) init.

** Description changed:

  [Environment]
  
  Trusty 14.04.2
  
  [Description]
  
  Looking in the /etc/init.d/haproxy script, particularly the stop method,
  is returning 4 in case of the pidfile doesn't exists.
  
   /bin/kill $pid || return 4.
  
  According to the spec that means 'insufficient privileges' which is not 
correct. This is causing pacemaker and other
  system monitoring tools to fail because it doesn't complains with LSB.
  
  An example:
  
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: 
glance02-res_glance_haproxy_monitor_5000:22 [ haproxy dead, but 
/var/run/haproxy.pid exists.\n ]
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: LRM 
operation res_glance_haproxy_stop_0 (call=33, rc=4, cib-update=19, 
confirmed=true) insufficient privileges
  
  Reference:
  
  haproxy_stop()
  {
  if [ ! -f $PIDFILE ] ; then
  # This is a success according to LSB
  return 0
  fi
  for pid in $(cat $PIDFILE) ; do
  /bin/kill $pid || return 4
  done
  rm -f $PIDFILE
  return 0
  }
  
  [Impact]
  
  * Pacemaker or any other system monitoring tool that relies
  on a proper exit code could fail as this doesn't complains with LSB.
  
  [Test Case]
  
- * Stop/Start haproxy on Trusty/Utopic and check exit code.
+ * Kill manually the process and then stop haproxy on Trusty/Utopic and
+ check exit code.
  
+ $ sudo killall -9 haproxy
  $ sudo service haproxy stop | echo $?
  
- 
- [Regression Potential] 
+ [Regression Potential]
  
  * If any application or shell script is relying on a wrong exit code
  4 , then it could be affected by this change.
  
  [Proposed solution]
  
  Backport the current devel (wily) init.

** Summary changed:

- Init file does not respect the LSB spec.
+ [sru] Init file does not respect the LSB spec.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1462495

Title:
  [sru] Init file does not respect the LSB spec.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1462495] Re: Init file does not respect the LSB spec.

2015-06-08 Thread Jorge Niedbalski
** Changed in: haproxy (Ubuntu Trusty)
   Status: New = In Progress

** Changed in: haproxy (Ubuntu Utopic)
   Status: New = In Progress

** Changed in: haproxy (Ubuntu Trusty)
 Assignee: (unassigned) = Jorge Niedbalski (niedbalski)

** Changed in: haproxy (Ubuntu Utopic)
 Assignee: (unassigned) = Jorge Niedbalski (niedbalski)

** Patch added: Utopic Patch.
   
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+attachment/4411675/+files/fix-lp-1462495-utopic.patch

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1462495

Title:
  [sru] Init file does not respect the LSB spec.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1462495] Re: Init file does not respect the LSB spec.

2015-06-08 Thread Chris J Arges
** Also affects: haproxy (Ubuntu Utopic)
   Importance: Undecided
   Status: New

** Also affects: haproxy (Ubuntu Trusty)
   Importance: Undecided
   Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1462495

Title:
  Init file does not respect the LSB spec.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1462495] Re: Init file does not respect the LSB spec.

2015-06-08 Thread Jorge Niedbalski
** Description changed:

  [Environment]
  
- Trusty 14.02
+ Trusty 14.04.2
  
  [Description]
  
  Looking in the /etc/init.d/haproxy script, particularly the stop method,
  is returning 4 in case of the pidfile doesn't exists.
  
-  /bin/kill $pid || return 4.
+  /bin/kill $pid || return 4.
  
  According to the spec that means 'insufficient privileges' which is not 
correct. This is causing pacemaker and other
  system monitoring tools to fail because it doesn't complains with LSB.
  
  An example:
  
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: 
glance02-res_glance_haproxy_monitor_5000:22 [ haproxy dead, but 
/var/run/haproxy.pid exists.\n ]
  Jun  2 12:52:13 glance02 crmd[2518]:   notice: process_lrm_event: LRM 
operation res_glance_haproxy_stop_0 (call=33, rc=4, cib-update=19, 
confirmed=true) insufficient privileges
  
  Reference:
  
  haproxy_stop()
  {
- if [ ! -f $PIDFILE ] ; then
- # This is a success according to LSB
- return 0
- fi
- for pid in $(cat $PIDFILE) ; do
- /bin/kill $pid || return 4
- done
- rm -f $PIDFILE
- return 0
+ if [ ! -f $PIDFILE ] ; then
+ # This is a success according to LSB
+ return 0
+ fi
+ for pid in $(cat $PIDFILE) ; do
+ /bin/kill $pid || return 4
+ done
+ rm -f $PIDFILE
+ return 0
  }
  
  [Proposed solution]
  
  Backport the current devel (wily) init.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to haproxy in Ubuntu.
https://bugs.launchpad.net/bugs/1462495

Title:
  Init file does not respect the LSB spec.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/haproxy/+bug/1462495/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs