summaryrefslogtreecommitdiff
path: root/doc/forum
diff options
context:
space:
mode:
Diffstat (limited to 'doc/forum')
-rw-r--r--doc/forum/Fail_to_push_changes_when_merging.mdwn27
-rw-r--r--doc/forum/Fail_to_push_changes_when_merging/comment_1_a44e03cbce4c996e136f917d8e06a7bb._comment12
-rw-r--r--doc/forum/Fail_to_push_changes_when_merging/comment_2_4c8e1d9409b8ecfc465550fbbf5c0708._comment8
-rw-r--r--doc/forum/Fail_to_push_changes_when_merging/comment_3_bdf54ac096c994c33d661b454d89c770._comment13
-rw-r--r--doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring.mdwn13
-rw-r--r--doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_1_c9a24f6022fbe9063356df3ddbd767d6._comment16
-rw-r--r--doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_2_2300ca8616f5bd229bf7b72a6fb96980._comment7
-rw-r--r--doc/forum/Script_to_convert_config_files_for_inclusion_in_Propellor_config.mdwn41
-rw-r--r--doc/forum/Systemd.container_produces_non-standard_systemd_container/comment_4_5dc1c3ee7f111fcc36c72487b7713854._comment9
-rw-r--r--doc/forum/gnupg2/comment_2_9070abc82d8aa259aca187ed5d6638cc._comment12
-rw-r--r--doc/forum/gnupg2/comment_3_996fe5791c175d709217875b5e751c4f._comment7
-rw-r--r--doc/forum/howto_mapM_RevertableProperty.mdwn52
-rw-r--r--doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment22
-rw-r--r--doc/forum/howto_mapM_RevertableProperty/comment_2_1327f1f218433ce262f871771c43452c._comment23
-rw-r--r--doc/forum/howto_mapM_RevertableProperty/comment_3_7e519cc5f1c07b66561ec31866ddbc8a._comment11
-rw-r--r--doc/forum/propellor_2.15.2_does_not_work_on_jessie.mdwn20
-rw-r--r--doc/forum/propellor_2.15.2_does_not_work_on_jessie/comment_1_eafe3affdad32bc9f4493a938f71d83f._comment9
17 files changed, 302 insertions, 0 deletions
diff --git a/doc/forum/Fail_to_push_changes_when_merging.mdwn b/doc/forum/Fail_to_push_changes_when_merging.mdwn
new file mode 100644
index 00000000..62bb314d
--- /dev/null
+++ b/doc/forum/Fail_to_push_changes_when_merging.mdwn
@@ -0,0 +1,27 @@
+I use a single propellor configuration repository shared across multiple hosts, but we don't have a central repository, e.g. we don't set origin on master branch so propellor do not push/pull from central repository when updating. That works fine as long as we do not merge branches. When we do we encounter the following error:
+
+ remote: Counting objects: 108, done.
+ remote: Compressing objects: 100% (105/105), done.
+ remote: Total 108 (delta 53), reused 0 (delta 0) s
+ Receiving objects: 100% (108/108), 41.16 KiB | 22.00 KiB/s, done.
+ Resolving deltas: 100% (53/53), completed with 19 local objects.
+ From .
+ * branch HEAD -> FETCH_HEAD
+
+ *** Please tell me who you are.
+
+ Run
+
+ git config --global user.email "you@example.com"
+ git config --global user.name "Your Name"
+
+ to set your account's default identity.
+ Omit --global to set the identity only in this repository.
+
+ fatal: unable to auto-detect email address (got 'root@lending-test.(none)')
+ propellor: <stdout>: hIsTerminalDevice: illegal operation (handle is closed)
+
+I do not understand properly how propellor does propagate changes in this case so I am unable to fix this issue in a sane way. What we currently do is simply log in in the server and wipe out propellor repo there, which works but kind of defeat the whole purpose of automated configuration management.
+
+Could you please advise on how we can fix this issue? Simply having a central repository would do the trick I guess, but is there another solution?
+
diff --git a/doc/forum/Fail_to_push_changes_when_merging/comment_1_a44e03cbce4c996e136f917d8e06a7bb._comment b/doc/forum/Fail_to_push_changes_when_merging/comment_1_a44e03cbce4c996e136f917d8e06a7bb._comment
new file mode 100644
index 00000000..751d701a
--- /dev/null
+++ b/doc/forum/Fail_to_push_changes_when_merging/comment_1_a44e03cbce4c996e136f917d8e06a7bb._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="spwhitton"
+ subject="comment 1"
+ date="2015-12-08T01:20:26Z"
+ content="""
+It looks like git is failing because it can't autodetect an e-mail address for root on the target machine. This might be because the target machine does not have a FQDN, but I'm not sure. Try logging into the target machine as root and running
+
+ git config --global user.email root@lending-test.local
+ git config --global user.name root
+
+as it suggests.
+"""]]
diff --git a/doc/forum/Fail_to_push_changes_when_merging/comment_2_4c8e1d9409b8ecfc465550fbbf5c0708._comment b/doc/forum/Fail_to_push_changes_when_merging/comment_2_4c8e1d9409b8ecfc465550fbbf5c0708._comment
new file mode 100644
index 00000000..47eb9f6a
--- /dev/null
+++ b/doc/forum/Fail_to_push_changes_when_merging/comment_2_4c8e1d9409b8ecfc465550fbbf5c0708._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="arnaud@30aba4d9f1742050874551d3ddc55ca8694809f8"
+ nickname="arnaud"
+ subject="comment 2"
+ date="2015-12-08T07:04:21Z"
+ content="""
+Thanks, I will try that. But why does it not happen when updating with fast-forward?
+"""]]
diff --git a/doc/forum/Fail_to_push_changes_when_merging/comment_3_bdf54ac096c994c33d661b454d89c770._comment b/doc/forum/Fail_to_push_changes_when_merging/comment_3_bdf54ac096c994c33d661b454d89c770._comment
new file mode 100644
index 00000000..a59296a0
--- /dev/null
+++ b/doc/forum/Fail_to_push_changes_when_merging/comment_3_bdf54ac096c994c33d661b454d89c770._comment
@@ -0,0 +1,13 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2015-12-08T15:53:27Z"
+ content="""
+Looks like a lacking FQDN indeed. There's a property to fix that! ;)
+
+Git is also picky about the user having a name.
+
+AFAIK, git does not make commits for fast-forward merges, but it does for
+non-fast-forward merges. I suspect that it's making such a merge in your
+case.
+"""]]
diff --git a/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring.mdwn b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring.mdwn
new file mode 100644
index 00000000..45f85767
--- /dev/null
+++ b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring.mdwn
@@ -0,0 +1,13 @@
+ Obnam.backupEncrypted "/" (Cron.Times "44 2 * * *") [] Obnam.OnlyClient (Gpg.GpgKeyId "XXXXXX")
+
+ $ propellor --spin myhost
+ myhost apt installed obnam ... ok
+ gpg: key XXXXXX: already in secret keyring
+ gpg: Total number processed: 1
+ gpg: secret keys read: 1
+ gpg: secret keys unchanged: 1
+ ** warning: user error (su ["-c","gpg --import","root"] exited 2)
+ myhost / backed up by obnam ... failed
+ myhost overall ... failed
+ Shared connection to myhost closed.
+ propellor: remote propellor failed
diff --git a/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_1_c9a24f6022fbe9063356df3ddbd767d6._comment b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_1_c9a24f6022fbe9063356df3ddbd767d6._comment
new file mode 100644
index 00000000..c65cc5cd
--- /dev/null
+++ b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_1_c9a24f6022fbe9063356df3ddbd767d6._comment
@@ -0,0 +1,16 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2015-12-11T16:41:30Z"
+ content="""
+More accurately, it's Gpg.keyImported that's failing, and this is because
+it's implemented using a flagFile to remember if it's imported the gpg key
+before. So the fix would be to implement:
+
+ hasPrivKey :: GpgKeyId -> User -> IO Bool
+
+ hasPubKey :: GpgKeyId -> User -> IO Bool
+
+And then Gpg.keyImported could use those with `check` to avoid redundant
+import.
+"""]]
diff --git a/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_2_2300ca8616f5bd229bf7b72a6fb96980._comment b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_2_2300ca8616f5bd229bf7b72a6fb96980._comment
new file mode 100644
index 00000000..8592e7e1
--- /dev/null
+++ b/doc/forum/Obnam.backupEncrypted_fails_if_gpg_key_is_already_in_keyring/comment_2_2300ca8616f5bd229bf7b72a6fb96980._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="gueux"
+ subject="comment 2"
+ date="2015-12-13T20:45:06Z"
+ content="""
+OK, I'll try to implement something this way :).
+"""]]
diff --git a/doc/forum/Script_to_convert_config_files_for_inclusion_in_Propellor_config.mdwn b/doc/forum/Script_to_convert_config_files_for_inclusion_in_Propellor_config.mdwn
new file mode 100644
index 00000000..c9f5ec8b
--- /dev/null
+++ b/doc/forum/Script_to_convert_config_files_for_inclusion_in_Propellor_config.mdwn
@@ -0,0 +1,41 @@
+This script turns
+
+ Section "Monitor"
+ Identifier "Configured Monitor"
+ EndSection
+
+into this:
+
+ [ "Section \"Monitor\""
+ , "\tIdentifier \"Configured Monitor\""
+ , "EndSection"
+ ]
+
+for the inclusion of short config files in your Propellor config using `File.hasContent`.
+
+[[!format haskell """
+#!/usr/bin/runhaskell
+
+main = interact $ unlines . propellorLines . lines
+
+propellorLines :: [String] -> [String]
+propellorLines (x:xs) = ("[ " ++ wrapEscapeLine x) : propellorLines' xs
+
+propellorLines' :: [String] -> [String]
+propellorLines' = foldr step ["]"]
+ where
+ step x xs = (", " ++ wrapEscapeLine x) : xs
+
+wrapEscapeLine :: String -> String
+wrapEscapeLine line = "\"" ++ (foldr step "" line) ++ "\""
+ where
+ step x xs
+ | x == '\t' = "\\t" ++ xs
+ | x == '\\' = x : x : xs
+ | x == '"' = '\\' : x : xs
+ | otherwise = x : xs
+"""]]
+
+Usage: `cat config_file | propellor_lines` (or in Emacs, dump the config file into your propellor config, select the region and use `C-u M-|` to pipe it through).
+
+-- [[spwhitton|https://spwhitton.name]]
diff --git a/doc/forum/Systemd.container_produces_non-standard_systemd_container/comment_4_5dc1c3ee7f111fcc36c72487b7713854._comment b/doc/forum/Systemd.container_produces_non-standard_systemd_container/comment_4_5dc1c3ee7f111fcc36c72487b7713854._comment
new file mode 100644
index 00000000..d7fe1dd5
--- /dev/null
+++ b/doc/forum/Systemd.container_produces_non-standard_systemd_container/comment_4_5dc1c3ee7f111fcc36c72487b7713854._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="jerryjacobs1989@d19093c366dfb2959c549ed1aff6175ddc7a7a5b"
+ nickname="jerryjacobs1989"
+ subject="Thank you"
+ date="2015-11-29T13:04:56Z"
+ content="""
+I was bitten also by this weird error message and have submitted it upstream:
+https://github.com/systemd/systemd/issues/2060
+"""]]
diff --git a/doc/forum/gnupg2/comment_2_9070abc82d8aa259aca187ed5d6638cc._comment b/doc/forum/gnupg2/comment_2_9070abc82d8aa259aca187ed5d6638cc._comment
new file mode 100644
index 00000000..d8233cee
--- /dev/null
+++ b/doc/forum/gnupg2/comment_2_9070abc82d8aa259aca187ed5d6638cc._comment
@@ -0,0 +1,12 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2015-12-30T19:02:30Z"
+ content="""
+I've merged a patch that adds a GNUPGBIN environment variable.
+
+It might make sense for propellor to look at git's gpg.program
+configuration and use it if set. Probably a propellor user wants to use the
+same gpg program for both signing and verifying their git commit and for
+propellor's privdata.
+"""]]
diff --git a/doc/forum/gnupg2/comment_3_996fe5791c175d709217875b5e751c4f._comment b/doc/forum/gnupg2/comment_3_996fe5791c175d709217875b5e751c4f._comment
new file mode 100644
index 00000000..ead20fb6
--- /dev/null
+++ b/doc/forum/gnupg2/comment_3_996fe5791c175d709217875b5e751c4f._comment
@@ -0,0 +1,7 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2016-01-03T20:57:42Z"
+ content="""
+gpg.program is also honored now
+"""]]
diff --git a/doc/forum/howto_mapM_RevertableProperty.mdwn b/doc/forum/howto_mapM_RevertableProperty.mdwn
new file mode 100644
index 00000000..7ebcbd47
--- /dev/null
+++ b/doc/forum/howto_mapM_RevertableProperty.mdwn
@@ -0,0 +1,52 @@
+Hello
+
+I have this kind of property
+
+ myProperty :: Conf -> RevertableProperty NoInfo
+
+
+now I have a [Conf] and I want to create also a RevertableProperty NoInfo which apply myProperty for each Conf
+
+I tried to find an equivalent of mapM for properties but I found nothing which works as expected.
+
+I tried with combineProperties but it failed also with a "cryptic message"
+mpoints is the [Conf]
+
+
+ src/config.hs:250:17:
+ Couldn't match type `CInfo
+ (PropertyListType (Property [NoInfo]))
+ (PropertyListType (Property [NoInfo]))'
+ with `NoInfo'
+ Expected type: RevertableProperty NoInfo
+ Actual type: RevertableProperty
+ (CInfo
+ (PropertyListType (Property [NoInfo]))
+ (PropertyListType (Property [NoInfo])))
+ In the expression: mount <!> umount
+ In an equation for `mountExp':
+ mountExp b
+ = mount <!> umount
+ where
+ mount
+ = combineProperties
+ "mount nfs files" (mapM mount'' mpoints)
+ umount
+ = combineProperties
+ "umount nfs files" (mapM umount'' mpoints)
+ mpoints
+ = [MountConf
+ "nfs"
+ ("ruche-"
+ ++
+ beamline ++ ".mydomain.org:/" ++ beamline ++ "-users")
+ ("/nfs/ruche-" ++ beamline ++ "/" ++ beamline ++ "-users"),
+ ....]
+ beamline = show b
+
+What is the right way to create a RevertableProperty from a list of RevertableProperty
+
+thanks
+
+Frederic
+
diff --git a/doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment b/doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment
new file mode 100644
index 00000000..66ac9a4f
--- /dev/null
+++ b/doc/forum/howto_mapM_RevertableProperty/comment_1_c2800340a5361add82f5e9e30b56b18c._comment
@@ -0,0 +1,22 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-02-08T15:00:26Z"
+ content="""
+combineProperties takes a list of PropertyListType, which is a type family
+consisting of [Property NoInfo] and [Property HasInfo]. So, you need to get
+from RevertableProperty NoInfo to one of those. `toProp` can do that.
+
+ combineProperties "desc" (map (toProp . myProperty) confs)
+
+But! I had a look and it was easy to make [RevertableProperty i] an
+instance of PropertyListType, which makes what you already tried type check
+too. I've done so in git.
+
+It would perhaps be nice to make lists of various sorts of properties
+instances of Traversable, so that mapM etc could be used over them. That
+would need some kind of monad for combining properties though, which does
+not currently exist. Might make more sense to make an instance of Foldable
+or just Monoid for properties. Any improvements in this area would be
+appreciated!
+"""]]
diff --git a/doc/forum/howto_mapM_RevertableProperty/comment_2_1327f1f218433ce262f871771c43452c._comment b/doc/forum/howto_mapM_RevertableProperty/comment_2_1327f1f218433ce262f871771c43452c._comment
new file mode 100644
index 00000000..20f6e640
--- /dev/null
+++ b/doc/forum/howto_mapM_RevertableProperty/comment_2_1327f1f218433ce262f871771c43452c._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="picca"
+ subject="comment 2"
+ date="2016-02-10T06:41:49Z"
+ content="""
+Thanks a lot joey :)
+
+I am learning haskell for now and I am not very confortable yet with the haskell Monoid, functor, applicative and monad.
+
+So what you are saying is that it would be great to do something like
+
+ instance monoid Property where
+ mempty = doNothing
+ mappend p1 p2 = combineProperty [p1, p2]
+ mconcat ps = combineProperty ps
+
+in order to combine properties.
+my question is why did you choose to create combineProperty instead of a Monoid at first ?
+
+thanks
+
+Frederic
+"""]]
diff --git a/doc/forum/howto_mapM_RevertableProperty/comment_3_7e519cc5f1c07b66561ec31866ddbc8a._comment b/doc/forum/howto_mapM_RevertableProperty/comment_3_7e519cc5f1c07b66561ec31866ddbc8a._comment
new file mode 100644
index 00000000..79ca2d93
--- /dev/null
+++ b/doc/forum/howto_mapM_RevertableProperty/comment_3_7e519cc5f1c07b66561ec31866ddbc8a._comment
@@ -0,0 +1,11 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 3"""
+ date="2016-02-10T16:09:08Z"
+ content="""
+Would probably be better to use `before`, since `combineProperties`
+needs a description of the combined properties.
+
+Using `doNothing` is kind of a hack, it would make propellor say it was
+running "noop property". Perhaps better to use a SemiGroup than a Monoid.
+"""]]
diff --git a/doc/forum/propellor_2.15.2_does_not_work_on_jessie.mdwn b/doc/forum/propellor_2.15.2_does_not_work_on_jessie.mdwn
new file mode 100644
index 00000000..7676a8a3
--- /dev/null
+++ b/doc/forum/propellor_2.15.2_does_not_work_on_jessie.mdwn
@@ -0,0 +1,20 @@
+Hello, I am trying to use propellor 2.15.2 on jessie.
+
+but when I do
+
+runhaskell config.hs, I get this error message
+
+
+ Propellor/Git.hs:10:9 Not in scope: `<$>'
+
+ Propellor/Git.hs:14:9 Not in scope: `<$>'
+
+ Propellor/Git.hs:18:9 Not in scope: `<$>'
+
+ Propellor/Git.hs:22:21 Not in scope: `<$>'
+
+maybe an import is missing with ghc 7.6.3
+
+Cheers
+
+Frederic
diff --git a/doc/forum/propellor_2.15.2_does_not_work_on_jessie/comment_1_eafe3affdad32bc9f4493a938f71d83f._comment b/doc/forum/propellor_2.15.2_does_not_work_on_jessie/comment_1_eafe3affdad32bc9f4493a938f71d83f._comment
new file mode 100644
index 00000000..f3af56ee
--- /dev/null
+++ b/doc/forum/propellor_2.15.2_does_not_work_on_jessie/comment_1_eafe3affdad32bc9f4493a938f71d83f._comment
@@ -0,0 +1,9 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-01-12T16:39:26Z"
+ content="""
+Yes, unfortuntely by importing Control.Applicative by default, newer
+versions of ghc make it rather harder to produce code that will build on
+older versions too. I've added these imports.
+"""]]