lsyncd don't work in centos7

Bug #1700051 reported by wutianwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
Expired
High
Unassigned

Bug Description

I used three controllers and two computes host. the lsyncd service don't work in the repo container, so it cann't sync the directory /var/www/ to other repo container.and it will failed at the after Tasks

this is the status of lsync service
[root@host3-repo-container-e4a196cb ~]# systemctl status lsyncd
● lsyncd.service - Live Syncing (Mirror) Daemon
   Loaded: loaded (/usr/lib/systemd/system/lsyncd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Thu 2017-06-22 23:21:33 PDT; 2h 19min ago
  Process: 15832 ExecStart=/usr/bin/lsyncd -nodaemon $LSYNCD_OPTIONS (code=exited, status=255)
 Main PID: 15832 (code=exited, status=255)

Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: -pidfile FILE Writes Lsyncds PID into FILE
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: -runner FILE Loads Lsyncds lua part from FILE
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: -version Prints versions and exits
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: LICENSE:
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: GPLv2 or any later version.
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: SEE:
Jun 22 23:21:33 host3-repo-container-e4a196cb lsyncd[15832]: `man lsyncd` for further information.
Jun 22 23:21:33 host3-repo-container-e4a196cb systemd[1]: lsyncd.service: main process exited, code=exited, status=255/n/a
Jun 22 23:21:33 host3-repo-container-e4a196cb systemd[1]: Unit lsyncd.service entered failed state.
Jun 22 23:21:33 host3-repo-container-e4a196cb systemd[1]: lsyncd.service failed.

wutianwei (wutianwei)
summary: - lsync don't work in centos7
+ lsyncd don't work in centos7
Changed in openstack-ansible:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Andy McCrae (andrew-mccrae)
Changed in openstack-ansible:
assignee: Andy McCrae (andrew-mccrae) → Jean-Philippe Evrard (jean-philippe-evrard)
Revision history for this message
Jean-Philippe Evrard (jean-philippe-evrard) wrote :

Could you show what's the content of the following files to help triaging the issue:
- /etc/sysconfig/lsyncd
- /etc/lsyncd.conf

Technically /etc/sysconfig/lsyncd should only hold LSYNCD_OPTIONS="/etc/lsyncd.conf"

Changed in openstack-ansible:
status: Confirmed → Incomplete
Changed in openstack-ansible:
assignee: Jean-Philippe Evrard (jean-philippe-evrard) → nobody
Revision history for this message
Satish Patel (satish-txt) wrote :

I am having same issue on CentOS7

[root@ostack-controller-03-repo-container-aa6db95e ~]# systemctl status lsyncd
● lsyncd.service - Live Syncing (Mirror) Daemon
   Loaded: loaded (/usr/lib/systemd/system/lsyncd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2018-05-23 08:05:24 EDT; 6h ago
 Main PID: 347 (code=exited, status=255)

May 23 08:05:23 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: Killed by signal 15.
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync error: received SIGINT, SIGTERM, or SIGHUP (code 20) at rsync.c(638) [sender=3.1.2]
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync error: unexplained error (code 255) at rsync.c(638) [sender=3.1.2]
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync: [sender] write error: Broken pipe (32)
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync error: unexplained error (code 255) at rsync.c(638) [sender=3.1.2]
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync: [sender] write error: Broken pipe (32)
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync error: unexplained error (code 255) at rsync.c(638) [sender=3.1.2]
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e lsyncd[347]: rsync: [sender] write error: Broken pipe (32)
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e systemd[1]: Unit lsyncd.service entered failed state.
May 23 08:05:24 ostack-controller-03-repo-container-aa6db95e systemd[1]: lsyncd.service failed.

Revision history for this message
Satish Patel (satish-txt) wrote :
Download full text (14.5 KiB)

This is what my files look like

- /etc/sysconfig/lsyncd
- /etc/lsyncd.conf

[root@ostack-controller-03-repo-container-aa6db95e ~]# cat /etc/sysconfig/lsyncd
LSYNCD_OPTIONS="/etc/lsyncd.conf"

[root@ostack-controller-03-repo-container-aa6db95e ~]# cat /etc/lsyncd.conf

--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- default-rsync.lua
--
-- Syncs with rsync ("classic" Lsyncd)
-- A (Layer 1) configuration.
--
-- License: GPLv2 (see COPYING) or any later version
-- Authors: Axel Kittenberger <email address hidden>
-- Pre/Post Command additions: Hugh Saunders <email address hidden>
--
--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-- needed for executing pre/post tasks. Can't use the lsync spawn method as
-- that requires an event, and an event isn't available for the initial
-- recursive sync.
require ('os')

if not default
then
 error( 'default not loaded' )
end

local rsync = { }

default.rsync = rsync

-- uses default collect

--
-- used to ensure there aren't typos in the keys
--
rsync.checkgauge = {

 -- unsets default user action handlers
 onCreate = false,
 onModify = false,
 onDelete = false,
 onStartup = false,
 onMove = false,

 delete = true,
 exclude = true,
 excludeFrom = true,
 target = true,

 rsync = {
  acls = true,
  archive = true,
  binary = true,
  bwlimit = true,
  checksum = true,
  compress = true,
  copy_links = true,
  cvs_exclude = true,
  dry_run = true,
  executability = true,
  group = true,
  hard_links = true,
  ignore_times = true,
  inplace = true,
  ipv4 = true,
  ipv6 = true,
  keep_dirlinks = true,
  links = true,
  one_file_system = true,
  owner = true,
  password_file = true,
  perms = true,
  protect_args = true,
  prune_empty_dirs = true,
  quiet = true,
  rsh = true,
  rsync_path = true,
  sparse = true,
  temp_dir = true,
  timeout = true,
  times = true,
  update = true,
  verbose = true,
  whole_file = true,
  xattrs = true,
  _extra = true,
  precmd = true,
  postcmd = true,
 },
}

--
-- Execute Pre/Post Command
--
prepost = function (config, prepost)
  local cmd_string = (config.rsync.rsh .. ' '
    .. string.gsub(config.target, ':.*$', '')
    .. ' "' .. config.rsync[prepost] .. '"' )
  log('Normal', 'Executing ' .. prepost .. ': ' .. cmd_string)
  os.execute(cmd_string)
end

--
-- Spawns rsync for a list of events
--
-- Exlcusions are already handled by not having
-- events for them.
--
rsync.action = function( inlet )

 --
 -- gets all events ready for syncing
 --
 local elist = inlet.getEvents(
  function(event)
   return event.etype ~= 'Init' and event.etype ~= 'Blanket'
  end
 )

 --
 -- Replaces what rsync would consider filter rules by literals
 --
 local functi...

Revision history for this message
Satish Patel (satish-txt) wrote :

In my cause i did "systemctl restart lsyncd" and now i am seeing my repo getting synced to other nodes.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for openstack-ansible because there has been no activity for 60 days.]

Changed in openstack-ansible:
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.