diff options
author | Joey Hess <joeyh@joeyh.name> | 2021-07-13 16:18:25 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2021-07-13 16:18:25 -0400 |
commit | 34d6c0a6e400fe69ba1d57f8124f5ed0ce38f58f (patch) | |
tree | d3bcabb30f29784419a06db3b58c0e50f1983755 | |
parent | 77cb5f88bff8341520454588f9a1ecb025ebd7da (diff) | |
parent | d21917b2133bdf33d5f7c7245702981ddf16b009 (diff) |
propellor spin
-rw-r--r-- | doc/forum/Problem_with_boolSystem_and_download.mdwn | 20 | ||||
-rw-r--r-- | joeyconfig.hs | 26 |
2 files changed, 27 insertions, 19 deletions
diff --git a/doc/forum/Problem_with_boolSystem_and_download.mdwn b/doc/forum/Problem_with_boolSystem_and_download.mdwn new file mode 100644 index 00000000..b261e045 --- /dev/null +++ b/doc/forum/Problem_with_boolSystem_and_download.mdwn @@ -0,0 +1,20 @@ +Hello, + +To settup a control system for a RAID interface, I have to install a binary from downloading on internet. +I am using the function downlaod that I copied over from deboostrap (src/Propellor/Property/Debootstrap.hs): + + download :: Url -> FilePath -> IO Bool + download url dest = anyM id + [ boolSystem "curl" [Param "-o", File dest, Param url] + , boolSystem "wget" [Param "-O", File dest, Param url] + ] + +As I read it, it should try to download using first `curl`, then `wget`. On this system, `curl` is not installed (but `wget` is). When the property is run I get the following warning : + + ** warning: curl: createProcess: runInteractiveProcess: exec: does not exist (No such file or directory) + +Clearly indicating that it does not manage to download using `curl (expected), but then, instead of trying with `wget` it fails with message : + + download ... ... failed + +I understand that the `anyM` is interupted before running the second element of the command list. I suspexct that `boolSystem` is not returning `false` when `curl` does not exist, but rather throwing some kind of exception (interupting the anyM tentatives). diff --git a/joeyconfig.hs b/joeyconfig.hs index dc2858a5..bdd2f4c5 100644 --- a/joeyconfig.hs +++ b/joeyconfig.hs @@ -16,7 +16,6 @@ import qualified Propellor.Property.Cron as Cron import qualified Propellor.Property.Sudo as Sudo import qualified Propellor.Property.User as User import qualified Propellor.Property.Hostname as Hostname -import qualified Propellor.Property.Fstab as Fstab import qualified Propellor.Property.Tor as Tor import qualified Propellor.Property.Dns as Dns import qualified Propellor.Property.Git as Git @@ -47,8 +46,8 @@ hosts = -- (o) ` [ darkstar , dragon , clam + , oyster , orca - , baleen , honeybee , kite , beaver @@ -101,10 +100,6 @@ clam = host "clam.kitenet.net" $ props [ (SshEcdsa, "ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBPhfvcOuw0Yt+MnsFc4TI2gWkKi62Eajxz+TgbHMO/uRTYF8c5V8fOI3o+J/3m5+lT0S5o8j8a7xIC3COvi+AVw=") ] & Apt.unattendedUpgrades - - -- & Tor.isRelay - -- & Tor.named "kite1" - -- & Tor.bandwidthRate (Tor.PerMonth "400 GB") & "/etc/resolv.conf" `File.hasContent` [ "nameserver 8.8.8.8" @@ -114,21 +109,14 @@ clam = host "clam.kitenet.net" $ props , "search kitenet.net" ] -baleen :: Host -baleen = host "baleen.kitenet.net" $ props - & standardSystem Unstable X86_64 [ "New git-annex build box." ] +oyster :: Host +oyster = host "oyster.kitenet.net" $ props + & standardSystem (Stable "buster") X86_64 + ["Unreliable server. Anything here may be lost at any time!" ] + & ipv4 "45.138.157.89" - -- Not on public network; ssh access via bounce host. - & ipv4 "138.38.77.40" - - -- The root filesystem content may be lost if the VM is resized. - -- /dev/vdb contains persistent storage. - & Fstab.mounted "auto" "/dev/vdb" "/var/lib/container" mempty - + & User.hasPassword (User "root") & Apt.unattendedUpgrades - & Postfix.satellite - & Apt.serviceInstalledRunning "ntp" - & Systemd.persistentJournal orca :: Host orca = host "orca.kitenet.net" $ props |