You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vcl.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2015/02/13 22:15:11 UTC

[jira] [Commented] (VCL-817) pgrep command arguments have changed with RHEL/CentOS 7.x

    [ https://issues.apache.org/jira/browse/VCL-817?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14320773#comment-14320773 ] 

ASF subversion and git services commented on VCL-817:
-----------------------------------------------------

Commit 1659685 from [~arkurth] in branch 'vcl/trunk'
[ https://svn.apache.org/r1659685 ]

VCL-817
(pgrep command arguments have changed with RHEL/CentOS 7.x)

Updated utils.pm::is_management_node_process_running to not use pgrep. The ps and grep commands are used instead.

Added utils.pm::get_reservation_vcld_process_name_regex. It returns a regex formatted to match the name generated by rename_vcld_process. This is called by utils.pm::reservation_being_processed and passed to is_management_node_process_running.

Removed utils.pm::kill_reservation_process. The code was old and buggy. Added Linux.pm::kill_process. This is called from new.pm::computer_not_being_used.


VCL-174
(NAT Support)
Moved the calls to populate_reservation_natport and update_reservation_natlog back to utils.pm::get_request_info. Removed calls from State.pm::initialize. They were being called too late and the connect method info contained in the DataStructure object didn't have the natport info. Added check to where they are called so that they are only called for the reservation currently being processed -- not all reservations in a cluster.

Changed name of iptables chain added to NAT host to include the vcld process name.

Udated iptables.pm::get_table_info to parse the iptables rule specifications and construct a hash.


Other
Changed the email subject generated in utils.pm::notify to include the VM host's short computer name rather than the full name. The subject can be quite long and truncated in some email clients.

Changed the vcld process name generated in utils.pm::rename_vcld_process to also use the shorter VM host name.

Added utils.pm::character_to_ascii_value - This returns the decimal, hex, or octal value of a single character. It may be used to include special characters in a regex passed to a subroutine such as is_management_node_process_running. This isn't currently being called.

Updated image.pm::setup_capture_base_image to call get_reservation_vcld_process_name_regex to determine the pattern to filter the vcld.log output displayed after the image capture begins.

> pgrep command arguments have changed with RHEL/CentOS 7.x
> ---------------------------------------------------------
>
>                 Key: VCL-817
>                 URL: https://issues.apache.org/jira/browse/VCL-817
>             Project: VCL
>          Issue Type: Improvement
>          Components: vcld (backend)
>            Reporter: Andy Kurth
>            Assignee: Andy Kurth
>             Fix For: 2.4
>
>
> We use {{pgrep -fl}} in a few places.  This used to return the full command names for each matching process.  This no longer seems to be the case with 7.x.  The command names are truncated.  There is a new {{-a}} switch which causes the full names to be displayed.  Unfortunately, the {{-a}} switch is not available on earlier versions and the command fails if it is included.
> Code needs to be updated to detect which switches are available and then assemble the correct command.
> This is very important.  pgrep is used to ensure multiple processes aren't forked for the same reservation.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)