Skip to content

Instantly share code, notes, and snippets.

running develop
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running egg_info
writing requirements to lib/foo.egg-info/requires.txt
writing lib/foo.egg-info/PKG-INFO
writing top-level names to lib/foo.egg-info/top_level.txt
writing dependency_links to lib/foo.egg-info/dependency_links.txt
package init file 'lib/foo/__init__.py' not found (or not a regular file)
./setup.py develop
running develop
Traceback (most recent call last):
File "./setup.py", line 38, in <module>
data_files=[])
File "/usr/lib/python2.7/distutils/core.py", line 152, in setup
dist.run_commands()
File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib/python2.7/distutils/dist.py", line 971, in run_command
cgmanager: Failed mounting /run/cgmanager/fs/cpuset: Device or resource busy
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
cgmanager: Failed mounting /run/cgmanager/fs/cpuset: Device or resource busy
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
cgmanager: Failed mounting /run/cgmanager/fs/cpuset: Device or resource busy
cgmanager: Failed mounting cgroups
cgmanager: Failed to set up cgroup mounts
@AntelopeSalad
AntelopeSalad / debug
Created July 16, 2014 11:45
I followed the steps here , https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1335418 , all commands were ran as root -- ie., sudo lxc-start -n test
lxc-start 1405510954.593 INFO lxc_start_ui - using rcfile /var/lib/lxc/test/config
lxc-start 1405510954.594 WARN lxc_log - lxc_log_init called with log already initialized
lxc-start 1405510954.594 INFO lxc_lsm - LSM security driver AppArmor
lxc-start 1405510954.594 DEBUG lxc_conf - allocated pty '/dev/pts/4' (5/6)
lxc-start 1405510954.594 DEBUG lxc_conf - allocated pty '/dev/pts/9' (7/8)
lxc-start 1405510954.594 DEBUG lxc_conf - allocated pty '/dev/pts/13' (9/10)
lxc-start 1405510954.595 DEBUG lxc_conf - allocated pty '/dev/pts/16' (11/12)
lxc-start 1405510954.595 INFO lxc_conf - tty's configured
lxc-start 1405510954.595 DEBUG lxc_start - sigchild handler set
lxc-start 1405510954.595 DEBUG lxc_console - opening /dev/tty for console peer
@AntelopeSalad
AntelopeSalad / test.rb
Last active August 29, 2015 14:03
Which is more idiomatic ruby?
path = '/home/you/foo/bar/baz'
# assume this path has a folder called hello and a file within the hello folder
Dir[File.join(path, '**', '*')].each do |file|
puts file.split(path)
# => hello/world.rb
end
# vs.
$ ldd ~/.rvm/gems/ruby-2.1.2/extensions/x86-linux/2.1.0/nokogiri-1.6.1/nokogiri/nokogiri.so
linux-gate.so.1 => (0xb7762000)
libruby.so.2.1 => /home/nick/.rvm/rubies/ruby-2.1.2/lib/libruby.so.2.1 (0xb746e000)
libexslt.so.0 => /home/nick/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.1/ports/i686-linux-gnu/libxslt/1.1.26/lib/libexslt.so.0 (0xb7459000)
libxslt.so.1 => /home/nick/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.1/ports/i686-linux-gnu/libxslt/1.1.26/lib/libxslt.so.1 (0xb741c000)
libxml2.so.2 => /home/nick/.rvm/gems/ruby-2.1.2/gems/nokogiri-1.6.1/ports/i686-linux-gnu/libxml2/2.8.0/lib/libxml2.so.2 (0xb72cc000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb710a000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb70ee000)
libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb70e8000)
libcrypt.so.1 => /lib/i386-linux-gnu/libcrypt.so.1 (0xb70b7000)
# role A - defaults/main.yml
runit_service:
# role A - tasks/main.yml
command: "echo '{{ item.name}} :: {{ item.script }}'"
with_items: runit_service
when: runit_service is iterable
# role B - using it in your inventory or somewhere
runit_service:
- name: Reboot a host and wait for it to return
hosts: somehost
tasks:
- shell: shutdown -r now
- pause: seconds=30
- local_action: shell ansible -m ping {{ inventory_hostname }}
register: result
until: result.rc == 0
retries: 30
delay: 10
failed: [localhost] => (item=curl,git) => {"failed": true, "item": "curl,git"}
stderr: E: There are problems and -y was used without --force-yes
stdout: Reading package lists...
Building dependency tree...
Reading state information...
The following NEW packages will be installed:
curl
0 upgraded, 1 newly installed, 0 to remove and 157 not upgraded.
Need to get 123 kB of archives.
module YourGem
class Bar
def initialize(something, options = {})
@something = something
@options = options
end
def world
puts 'world'
end