Project

General

Profile

Actions

User story #8082

open

Rudder/cfengine fails to edit bind-mounted files on docker

Added by Janos Mattyasovszky almost 9 years ago. Updated almost 7 years ago.

Status:
New
Priority:
N/A
Assignee:
-
Category:
Documentation
UX impact:
Suggestion strength:
User visibility:
Effort required:
Name check:
Fix check:
Regression:

Description

On Docker /etc/hosts is a bind-mounted file, which cannot be moved, just edited.

root@rts_m01_r01:/# cat /proc/mounts  | grep hosts
/dev/sdb /etc/hosts btrfs rw,noatime,space_cache,subvolid=5,subvol=/containers/df161786fd391f3afd72e7f671dad354ae0bae730261b80b79ebbc50b6fcd737/hosts 0 0
root@rts_m01_r01:/#

This causes a promise to fail:

2016-03-18T00:08:57+0100    error: /default/check_generic_file_content/files/'/etc/hosts'[0]: Can't rename '/etc/hosts.cf-after-edit' to '/etc/hosts' - so promised edits could not be moved into place. (rename: Device or resource busy)
2016-03-18T00:08:57+0100    error: /default/check_generic_file_content/files/'/etc/hosts'[0]: Unable to save file '/etc/hosts' after editing

Not sure how this could be solved. I on my side did this by copying the file away, editing it, then cat'ing it back to the same inode it used to have.

Actions #1

Updated by Janos Mattyasovszky almost 9 years ago

  • Tracker changed from Bug to User story
  • Category set to Documentation

This is actually not be a bug since this is an excpected behaior (Works as Designed).
I would still suggest to have something like this documented in any possible docker-related documentation paragraph in future.

Actions #2

Updated by Janos Mattyasovszky almost 9 years ago

  • Subject changed from Rudder tries to edit /etc/hosts on docker to Rudder/cfengine fails to edit bind-mounted files on docker
Actions #3

Updated by Alexis Mousset almost 9 years ago

  • Target version set to 2.11.20
Actions #4

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.20 to 2.11.21
Actions #5

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.21 to 2.11.22
Actions #6

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.22 to 2.11.23
Actions #7

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.23 to 2.11.24
Actions #8

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 2.11.24 to 308
Actions #9

Updated by Vincent MEMBRÉ over 8 years ago

  • Target version changed from 308 to 3.1.14
Actions #10

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.14 to 3.1.15
Actions #11

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.15 to 3.1.16
Actions #12

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.16 to 3.1.17
Actions #13

Updated by Vincent MEMBRÉ about 8 years ago

  • Target version changed from 3.1.17 to 3.1.18
Actions #14

Updated by Vincent MEMBRÉ almost 8 years ago

  • Target version changed from 3.1.18 to 3.1.19
Actions #15

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.19 to 3.1.20
Actions #16

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.20 to 3.1.21
Actions #17

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.21 to 3.1.22
Actions #18

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.22 to 3.1.23
Actions #19

Updated by Vincent MEMBRÉ over 7 years ago

  • Target version changed from 3.1.23 to 3.1.24
Actions #20

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 3.1.24 to 3.1.25
Actions #21

Updated by Benoît PECCATTE about 7 years ago

  • Target version changed from 3.1.25 to 4.1.9
Actions #22

Updated by Vincent MEMBRÉ about 7 years ago

  • Target version changed from 4.1.9 to 4.1.10
Actions #23

Updated by Benoît PECCATTE almost 7 years ago

  • Target version changed from 4.1.10 to Ideas (not version specific)
Actions

Also available in: Atom PDF