Skip to content

Instantly share code, notes, and snippets.

How MAAS passes mount options to curtin

In the storage configuration that MAAS passes to curtin it includes stanzas like:

- id: sda-part5_mount
  type: mount
  path: /srv
  options: rw,nosuid,nodev,noexec,relatime
echo 'Defaults !tty_tickets' | sudo tee -a /etc/sudoers.d/no_tty_tickets
@allenap
allenap / gist:8229970
Created January 3, 2014 00:15
Example of aptdaemon not updating dependencies on Saucy. Is this broken behaviour, or are my expectations to blame?
import aptdaemon.client
def printcall(*args, **kwargs):
print("call(*%r, **%r)" % (args, kwargs))
client = aptdaemon.client.AptClient()
# I have make installed, but not abiword.
txn = client.install_packages(["make", "abiword"])
txn.connect("dependencies-changed", printcall)
txn.simulate()
@allenap
allenap / gcd.sh
Last active December 30, 2016 07:11
# Bash function to cd to a package on GOPATH (inspiration for that
# from... elsewhere; I can't remember now unfortunately), and bash
# completion for the aforementioned (my own work). Have at it.
# -- Gavin Panella, 2013
gcd() {
local package="$1"
local pdir="$(go list -e -f '{{.Dir}}' "${package}")"
if [ -z "${pdir}" ]
then
#!/usr/bin/env python2.7
# Copyright 2013 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Upload files to MAAS.
Pipe or redirect the file to upload to stdin.
This is a workaround while file uploads don't work via maas-cli; see
https://bugs.launchpad.net/maas/+bug/1187826 for details.