Giter VIP home page Giter VIP logo

bsd-cloudinit's People

Contributors

ader1990 avatar alexcoman avatar alexpilotti avatar apua avatar avladu avatar cao avatar cmin764 avatar cropcirclesys avatar gitter-badger avatar gokrokvertskhov avatar iblislin avatar klindgren-godaddy avatar martymac avatar mgagne avatar pcmanticore avatar pellaeon avatar pubyun avatar raymiiorg avatar s7oneyuk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bsd-cloudinit's Issues

FreeBSD 10.3 : SetUserPasswordPlugin failes with HTTP 500

Hi,

We've prepared a FreeBSD 10.3 image to run bsd-cloudinit during boot and have setup the image so that a root password is offered by the Openstack environment .

"Everything" seems to work ok except for the password provided by openstack nog being set correctly.

The error displayed is :

Nov 15 11:09:27 freebsd-template kernel: 2016-11-15 11:09:27.026 682 ERROR cloudbaseinit.init [-] plugin 'SetUserPasswordPlugin' failed with error 'HTTP Error 500: Internal Server Error'

The same openstack environment has no trouble setting the root password in other images as far as I can tell.

We've modified the default behaviour of the .sh script to include a configfile like this:

$PYTHON $BSDINIT_DIR/run.py --config-file /etc/cloudinit.conf --log-file /tmp/cloudinit.log $BSDINIT_SCRIPT_DEBUG_FLAG

config file contents:

cat /etc/cloudinit.conf
[DEFAULT]
username=root

Any thought on how to troubleshoot this issue?

Kind regards,

Fuxjezz

Network device mismatch.

Thanks for this tool. I'm getting em0 in rc.conf, and when I boot in openstack I'm getting vtnet0. Perhaps this is soemthing unique to my environment? Causes host to fail to get an ip and consequently fail cloud init.

Resize

Hi,

Is the actual resize work live, in one go?
No matter what I do, I still have to reboot the machine until I can "growfs /" to max.

Chown to root:root on FreeBSD system

Hi,

The script tries to perform a chown to root:root somewhere during its execution.

Shouldn't this be "root:wheel"?

Kind regards,

Fuxjezz

2016-11-15 11:09:28.040 682 ERROR cloudbaseinit.init [-] plugin 'SetUserSSHPublicKeysPlugin' failed with error 'Command 'chown -R root:root /root' returned non-zero exit status 1'
2016-11-15 11:09:28.040 682 ERROR cloudbaseinit.init [-] Command 'chown -R root:root /root' returned non-zero exit status 1
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init Traceback (most recent call last):
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init File "/root/bsd-cloudinit/cloudbaseinit/init.py", line 67, in _exec_plugin
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init shared_data)
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init File "/root/bsd-cloudinit/cloudbaseinit/plugins/freebsd/sshpublickeys.py", line 60, in execute
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init osutils.chown(username, username, user_home)
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init File "/root/bsd-cloudinit/cloudbaseinit/osutils/freebsd.py", line 187, in chown
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init shell=True
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init File "/usr/local/lib/python2.7/subprocess.py", line 541, in check_call
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init raise CalledProcessError(retcode, cmd)
2016-11-15 11:09:28.040 682 TRACE cloudbaseinit.init CalledProcessError: Command 'chown -R root:root /root' returned non-zero exit status 1

Swap and ephemeral disk setup

Since I'm using this bsd-cloudinit, I would like to know if there is any plan to support mounting swap drive and ephemeral disk? I could my some effort trying to add this but I don't know how nova gets the metadata information about the disks in the first place. Having an option to add ZFS customization from user-data on ephemeral disk would also be something good to have. Can you share any information and thoughts regarding this matter?

[osutils/freebsd.py] code refine and unit tests working list

When i wrote those code, i'm not quite understand programming in python. :(
So i will do some code refine now; comment welcomed! ๐Ÿ˜„

Working list:
Class FreeBSDUtils

  • reboot
  • user_exists
  • create_user
  • set_host_name
  • set_user_password
  • add_user_to_local_group
  • get_user_home
  • get_network_adapters
  • set_static_network_config
  • set_dhcp_network_config
  • set_timezone
  • adj_sys_time
  • _add_comment
  • _add_rc_conf
  • chown

Also, the naming of those functions (set_ and get_) are really non-pythonic style.
Maybe we should use property.

FreeBSD 10.2 + OVH OpenStack

Hi, I'm using Public Cloud from OVH.com. It uses OpenStack but I'm having issues with FreeBSD 10.2 and BSD Cloudinit. The system boots at the first time but the second partition (freebsd ufs mounted in /) is not resized, the NIC controller bounds the IP from DHCP pool, but not the gateway and if I try to reboot, the boot sequence freezes at "Timecounter tick every 1.000 msec" every time. The image used was made in QEMU and I tryied the experimental pre-built image from your website too, with the same behavior.

Thanks.
freebsdcloudinit

sudo/sudoers

Do you plan to implement sudo/sudoers any soon?

[osutils/freebsd.py] param `invite_group` should be optional in create_user

Weird logic...
I can not recall why i wrote this...

FreeBSDUtils().create_user('bsdtest', 'pw')

/root/bsd-cloudinit/cloudbaseinit/osutils/freebsd.py in create_user(self, username, password, invite_group, password_expires)
     29 
     30         assert not invite_group or isinstance(invite_group, list), "param invite_group must be a list."
---> 31         assert invite_group, "invite_group cannot be empty."
     32         for i in invite_group:
     33             grouplist += i+','

AssertionError: invite_group cannot be empty.

user-data support

Do you have any plans to support user-data? I need to set root password and install ssh keys for root.

Problem with python on FreeBSD 12 RC1

When cloudbaseinit run, python crash with this log stack.

Starting local daemons:2018-11-22 00:02:29.890 673 CRITICAL cloudbaseinit [-] AttributeError: Undefined symbol "ERR_load_crypto_strings"
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit Traceback (most recent call last):
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/run.py", line 3, in
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit shell.main()
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/shell.py", line 29, in main
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit init.InitManager().configure_host()
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/init.py", line 107, in configure_host
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit plugins = plugins_factory.load_plugins()
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/plugins/common/factory.py", line 45, in load_plugins
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit plugins.append(cl.load_class(class_path)())
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/utils/classloader.py", line 28, in load_class
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit module = import(parts[0], fromlist=parts[1])
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/plugins/freebsd/setuserpassword.py", line 25, in
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit from cloudbaseinit.utils import crypt
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/root/bsd-cloudinit/cloudbaseinit/utils/crypt.py", line 89, in
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit openssl.ERR_load_crypto_strings.restype = ctypes.c_int
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/usr/local/lib/python2.7/ctypes/init.py", line 379, in getattr
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit func = self.getitem(name)
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit File "/usr/local/lib/python2.7/ctypes/init.py", line 384, in getitem
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit func = self._FuncPtr((name_or_ordinal, self))
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit AttributeError: Undefined symbol "ERR_load_crypto_strings"
2018-11-22 00:02:29.890 673 TRACE cloudbaseinit

Support for CloudStack

Hi!

I would be interested to add support for CloudStack. Would it be accepted? I see there is already support for EC2 so this does not seem an Openstack only project.

cloud-init fails to reconfigure hostname when launched in new instance

In the DigitalOcean cloud we have found that if a snapshot image is created from a vm with FreeBSD + cloud-init, instances created using that image will fail to use the hostname provided in ConfigDrive resulting in the hostname from the original system continuing to be used.

It appears that if a prior run is found, changes to the ConfigDrive configuration are not read and used.

We do not see this from other ports of cloud-init on Linux distributions.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.