I downloaded and installed the static linked docker 1.6.1 from this site and ran it on RHEL 7.1 :
[ root@localhost bin]
I see that there is a warning: " Udev sync is not supported. This will lead to unexpected behavior, data loss and errors ", and after checking the docker source code, I found that the warning log is in deviceset.go :
func (devices *DeviceSet) initDevmapper(doInit bool) error { ...... // https://github.com/docker/docker/issues/4036 if supported := devicemapper.UdevSetSyncSupport(true); !supported { log.Warnf("Udev sync is not supported. This will lead to unexpected behavior, data loss and errors") } log.Debugf("devicemapper: udev sync support: %v", devicemapper.UdevSyncSupported()) ...... }
devicemapper.UdevSetSyncSupport as follows:
// UdevSyncSupported returns whether device-mapper is able to sync with udev // // This is essential otherwise race conditions can arise where both udev and // device-mapper attempt to create and destroy devices. func UdevSyncSupported() bool { return DmUdevGetSyncSupport() != 0 } // UdevSetSyncSupport allows setting whether the udev sync should be enabled. // The return bool indicates the state of whether the sync is enabled. func UdevSetSyncSupport(enable bool) bool { if enable { DmUdevSetSyncSupport(1) } else { DmUdevSetSyncSupport(0) } return UdevSyncSupported() }
I see that the reason is the inability to synchronize udev . How to enable udev sync?
Update: After checking the dm_udev_set_sync_support disassembly dm_udev_set_sync_support :
(gdb) disassemble dm_udev_set_sync_support Dump of assembler code for function dm_udev_set_sync_support: => 0x0000000000a3e4e0 <+0>: repz retq End of assembler dump.
This is an empty function and does nothing, not to mention synchronization support. Does this mean that the static docker embedded binary is not used?
linux docker go rhel rhel7
Nan xiao
source share