Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when refreshing git repo #37

Open
GillesMocellin opened this issue Feb 1, 2017 · 1 comment
Open

Problem when refreshing git repo #37

GillesMocellin opened this issue Feb 1, 2017 · 1 comment

Comments

@GillesMocellin
Copy link

Modifications on the letsencrypt Git repo is often not a simple fast-forward.
in install.sls, the git.latest fails.
We need something like a force_fetch option.
I tried, it worked, but with a strange warning.

My modification :

diff --git a/letsencrypt/install.sls b/letsencrypt/install.sls
index 31b279b..6876a50 100644
--- a/letsencrypt/install.sls
+++ b/letsencrypt/install.sls
@@ -8,3 +8,4 @@ letsencrypt-client-git:
     - name: https://github.com/letsencrypt/letsencrypt
     - target: {{ letsencrypt.cli_install_dir }}
     - force_reset: True
+    - force_fetch: True

The Warning :

    git_|-letsencrypt-client-git_|-https://github.com/letsencrypt/letsencrypt_|-latest:
        ----------
        __run_num__:
            0
        changes:
            ----------
        comment:
        duration:                                                                                                                                                                         1691.61
        name:
            https://github.com/letsencrypt/letsencrypt
        result:
            True
        start_time:
            10:50:29.373780                                                                                                                                                           warnings:
            - 'force_fetch' is an invalid keyword argument for 'git.latest'. If you were trying to pass additional data to be used in a template context, please populate 'con
text' with 'key: value' pairs. Your approach will work until Salt Carbon is out. Please update your state files.
bergwiesel added a commit to PsychologyUniGraz/certbot-formula that referenced this issue Feb 3, 2017
@boltronics
Copy link

Here is an example of the error:

----------
          ID: letsencrypt-client-git
    Function: git.latest
        Name: https://github.com/letsencrypt/letsencrypt
      Result: False
     Comment: Fetch failed. Set 'force_fetch' to True to force the fetch if the failure was due to not being able to fast-forward. Output of the fetch command follows:
              
              From https://github.com/letsencrypt/letsencrypt
                 6bdb87d..324caf2  acme-v2    -> origin/acme-v2
               ! [rejected]        actually-file-update-apache -> origin/actually-file-update-apache  (non-fast-forward)
                 ef72970..b25ea22  auto-path  -> origin/auto-path
                 6c52cc4..16ed141  master     -> origin/master
                 26f82a2..121d729  os-auto-update-system -> origin/os-auto-update-system
     Started: 10:59:47.014617
    Duration: 4314.285 ms
     Changes:   

Is the force_fetch issue still a problem in Salt 2017.7.0? I couldn't find any bug reports about this, and it doesn't throw the error you have described for me (at least during normal execution without changes). Will update this and open a bug report if I see otherwise.

In any case, not having force_fetch set to True here sounds like a bug in this formula. If that argument throws a warning, then that's a separate bug in Salt.

boltronics added a commit to sitepoint/letsencrypt-formula that referenced this issue Aug 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants