Jump to content
Read the Funtoo Newsletter: Summer 2023 ×

ego crashes when meta-repo is read only


Recommended Posts

I mount meta-repo as read only to lxd container.

If I run "ego sync" it crushes:

 # ego sync
ERROR: Ego encountered an unexpected error: OSError
ERROR: Full traceback written to /tmp/ego-traceback-3362.txt.

# cat /tmp/ego-traceback-3362.txt
[Errno 30] Read-only file system: '/var/git/meta-repo/.touch'Traceback (most recent call last):
  File "/usr/bin/ego", line 120, in <module>
    EgoModule.run_ego_module(action, econfig, args, VERSION)
  File "/usr/share/ego/python/ego/module.py", line 102, in run_ego_module
  File "/usr/share/ego/python/ego/module.py", line 87, in __call__
  File "/usr/share/ego/modules/sync.ego", line 342, in handle
  File "/usr/share/ego/modules/sync.ego", line 192, in sync_meta_repo
  File "/usr/lib64/python3.6/pathlib.py", line 1236, in touch
    fd = self._raw_open(flags, mode)
  File "/usr/lib64/python3.6/pathlib.py", line 1044, in _raw_open
    return self._accessor.open(self, flags, mode)
  File "/usr/lib64/python3.6/pathlib.py", line 387, in wrapped
    return strfunc(str(pathobj), *args)
OSError: [Errno 30] Read-only file system: '/var/git/meta-repo/.touch'

If I set another path for meta-repo: "meta_repo_path = /var/git/meta-repo-local" than ego sync work without issues.

local meta-repo and read-only meta-repo are identical.


Any chance for ego sync work on read only meta-repo?

Link to comment
Share on other sites

I have many lxd containers and want to save disk space. I want to share meta-repo and distfiles beetween all of them. Ego sync inside container should only update configs. "Funtoo Containers" have this feature but my funtoo instalation have not. For example in Funtoo Container:

 # ego sync
WARNING: Meta-repo is read-only -- running in config-only mode.
Updating /etc/portage/repos.conf...
Updating profiles at /etc/portage/make.profile/parent...


Link to comment
Share on other sites

11 hours ago, jhan said:

The question is, which config files are we talking about? Are those config files then different for each container or could you provide them for the containers from a "master config" as well?

If you can't do that, you are pratically looking for another switch for ego-sync, something like "--config-only", or?

Just to understand the way you are using the meta-repo. You use ego-sync to update the config files in your containers but what do you use the updated information for?

Config files for emerge. It does not see any new packages in shared meta-repo without updating config.

Yes, "ego-sync --config-only" update config, but it checks for read-only and also crash.

10 hours ago, palica said:

what ego version in container and on the host?



10 hours ago, palica said:

which release are you using in containers?

I use image from tutorial https://www.funtoo.org/LXD

 # lxc image info funtoo
Fingerprint: 6558977224e0b3b631594e210637a1f65b4a618c492cb201b54cdf49928acc09
Size: 231.97MB
Architecture: x86_64
Public: no
    Created: 2018/05/19 08:13 UTC
    Uploaded: 2018/05/22 10:28 UTC
    Expires: never
    Last used: 2018/05/26 10:24 UTC
    description: Funtoo Current Westmere 64bit  2018-05-19
    name: funtoo-current-x86-64bit-intel64-westmere
    - funtoo
Cached: no
Auto update: disabled

Containers are in "security.privileged true", because of samba addc (it require real root), so meta-repo owner in container is portage user.

 # lxc profile show default
  environment.LANG: en_US.UTF-8
  environment.LC_ALL: en_US.UTF-8
  environment.LC_COLLATE: POSIX
  raw.lxc: lxc.mount.entry = none dev/shm tmpfs rw,nosuid,nodev,create=dir
description: Default LXD profile
    path: /var/cache/portage/distfiles
    source: /var/cache/portage/distfiles
    type: disk
    nictype: bridged
    parent: br0
    type: nic
    path: /var/git/meta-repo
    readonly: "true"
    source: /var/git/meta-repo
    type: disk
    path: /
    pool: default
    type: disk
name: default
- /1.0/containers/addc
- /1.0/containers/dc
- /1.0/containers/test

# lxc config show dc
architecture: x86_64
  image.description: Funtoo Current Westmere 64bit  2018-05-19
  image.name: funtoo-current-x86-64bit-intel64-westmere
  security.privileged: "true"
  volatile.base_image: 6558977224e0b3b631594e210637a1f65b4a618c492cb201b54cdf49928acc09
  volatile.eth0.hwaddr: 00:16:3e:d1:61:d6
  volatile.eth0.name: eth0
  volatile.idmap.base: "0"
  volatile.idmap.next: '[]'
  volatile.last_state.idmap: '[]'
  volatile.last_state.power: RUNNING
devices: {}
ephemeral: false
- default
stateful: false
description: ""


Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...