-1

I have run apt-get install python-git-doc and apt install python-is-python3 python3-git to install python-git

And I have edited my /etc/salt/master file, so it now looks like this:

fileserver_backend:
  - git
  - roots
gitfs_remotes:
  - https://github.com/saltstack-formulas/memcached-formula.git

I restart my salt-master using systemctl restart salt-master.

Yet when I run salt x_minion cp.list_master my output generates with no errors but I don't have any memcached files (x_minion I just made up to not have my data here, its just a fake name for my minion)

# salt myminion cp.list_master
myminion:
  - .git/HEAD
  - .git/config
  - .git/description
  - .git/hooks/applypatch-msg.sample
  - .git/hooks/commit-msg.sample
  - .git/hooks/fsmonitor-watchment.sample
  - .git/hooks/post-update.sample
  - .git/hooks/pre-applypatch.sample
  - .git/hooks/pre-commit.sample
  - .git/hooks/pre-merge-commit.sample
  - .git/hooks/pre-push.sample
  - .git/hooks/pre-rebase.sample
  - .git/hooks/pre-receive.sample
  - .git/hooks/prepare-commit-msg.sample
  - .git/hooks/update.sample
  - .git/info/exclude
  - apache.sls.save
  - apache.sls.save.1
  - apache/init.sls
  - apache/map.sls
  - apache/mods.sls
  - apache/welcome.sls
  - mods.sls.save
  - show_content.sls
  - top.sls

Am I missing a step to correctly install the memcached formula?

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
FlawFull
  • 87
  • 9

1 Answers1

1

The fileserver_backend should be gitfs, not git.

Aside from that, you are missing a step of mapping the saltenvs for the formula. As that repo has no tags, you're stuck with pinning by commit. Excluding the top level folder is also a good idea:

gitfs_remotes:
  - https://github.com/saltstack-formulas/memcached-formula.git:
    - all_saltenvs: ba7fdda
    - root: memcached
    - mountpoint: salt://memcached

Also note that you appear to have a git repo and various temporary files in your file root, which you are exposing to all minions.

OrangeDog
  • 36,653
  • 12
  • 122
  • 207
  • This does the same as what I said. It doesn't give any errors but doesn't list any Memcached files – FlawFull Feb 28 '23 at 14:32
  • 1
    You fixed the `fileserver_backend` and restarted the master and checked it was up to date with `salt-run fileserver.update`? – OrangeDog Feb 28 '23 at 21:14
  • Yes, I changed the fileserver_backend and still the same result. When I run `salt-run fileserver.update` I get `[CRITICAL] No suitable gitfs provider module is installed. True` – FlawFull Mar 01 '23 at 09:52
  • Then you haven't installed either `gitpython` or `pygit2` into Salt's environment. – OrangeDog Mar 01 '23 at 10:30
  • I have pygit2 installed – FlawFull Mar 01 '23 at 11:40
  • 1
    Not in Salt's environment you don't. Confirm with `salt --versions`. – OrangeDog Mar 01 '23 at 12:05
  • I'm confused then, I have installed pygit2, is there something special I have to do to link it to salt? It says `pygit2: Not Installed` so it's not linked to salt – FlawFull Mar 01 '23 at 12:26
  • I'm on Ubuntu 20.04.5 LTS – FlawFull Mar 01 '23 at 12:27
  • 1
    I assume you're using a onedir package? You need to use e.g. `salt-pip` to install it. – OrangeDog Mar 01 '23 at 12:35
  • amzing! `salt-pip install pygit2` linked pygit2 to my salt. After running `salt-run fileserver.update` and `systemctl restart salt-master` (just in case). When I now run the command `salt myminion dan_minion cp.list_master` the `memcached` files now appear – FlawFull Mar 01 '23 at 14:01
  • 1
    It doesn't "link" it, it installs it. – OrangeDog Mar 01 '23 at 14:11