GithubHelp home page GithubHelp logo

lxc / linuxcontainers.org Goto Github PK

View Code? Open in Web Editor NEW
96.0 96.0 117.0 2.44 GB

The linuxcontainers.org website

Home Page: https://linuxcontainers.org

License: Other

HTML 73.95% Python 12.39% CSS 5.65% JavaScript 8.00%
containers hacktoberfest markdown python website

linuxcontainers.org's Introduction

Linux Containers logo

LXC

LXC is the well-known and heavily tested low-level Linux container runtime. It is in active development since 2008 and has proven itself in critical production environments world-wide. Some of its core contributors are the same people that helped to implement various well-known containerization features inside the Linux kernel.

Status

Type Service Status
CI (Linux) GitHub Build Status
CI (Linux) Jenkins Build Status
Project status CII Best Practices CII Best Practices
Fuzzing OSS-Fuzz Fuzzing Status
Fuzzing CIFuzz CIFuzz

System Containers

LXC's main focus is system containers. That is, containers which offer an environment as close as possible as the one you'd get from a VM but without the overhead that comes with running a separate kernel and simulating all the hardware.

This is achieved through a combination of kernel security features such as namespaces, mandatory access control and control groups.

Unprivileged Containers

Unprivileged containers are containers that are run without any privilege. This requires support for user namespaces in the kernel that the container is run on. LXC was the first runtime to support unprivileged containers after user namespaces were merged into the mainline kernel.

In essence, user namespaces isolate given sets of UIDs and GIDs. This is achieved by establishing a mapping between a range of UIDs and GIDs on the host to a different (unprivileged) range of UIDs and GIDs in the container. The kernel will translate this mapping in such a way that inside the container all UIDs and GIDs appear as you would expect from the host whereas on the host these UIDs and GIDs are in fact unprivileged. For example, a process running as UID and GID 0 inside the container might appear as UID and GID 100000 on the host. The implementation and working details can be gathered from the corresponding user namespace man page.

Since unprivileged containers are a security enhancement they naturally come with a few restrictions enforced by the kernel. In order to provide a fully functional unprivileged container LXC interacts with 3 pieces of setuid code:

  • lxc-user-nic (setuid helper to create a veth pair and bridge it on the host)
  • newuidmap (from the shadow package, sets up a uid map)
  • newgidmap (from the shadow package, sets up a gid map)

Everything else is run as your own user or as a uid which your user owns.

In general, LXC's goal is to make use of every security feature available in the kernel. This means LXC's configuration management will allow experienced users to intricately tune LXC to their needs.

A more detailed introduction into LXC security can be found under the following link

Removing all Privilege

In principle LXC can be run without any of these tools provided the correct configuration is applied. However, the usefulness of such containers is usually quite restricted. Just to highlight the two most common problems:

  1. Network: Without relying on a setuid helper to setup appropriate network devices for an unprivileged user (see LXC's lxc-user-nic binary) the only option is to share the network namespace with the host. Although this should be secure in principle, sharing the host's network namespace is still one step of isolation less and increases the attack vector. Furthermore, when host and container share the same network namespace the kernel will refuse any sysfs mounts. This usually means that the init binary inside of the container will not be able to boot up correctly.

  2. User Namespaces: As outlined above, user namespaces are a big security enhancement. However, without relying on privileged helpers users who are unprivileged on the host are only permitted to map their own UID into a container. A standard POSIX system however, requires 65536 UIDs and GIDs to be available to guarantee full functionality.

Configuration

LXC is configured via a simple set of keys. For example,

  • lxc.rootfs.path
  • lxc.mount.entry

LXC namespaces configuration keys by using single dots. This means complex configuration keys such as lxc.net.0 expose various subkeys such as lxc.net.0.type, lxc.net.0.link, lxc.net.0.ipv6.address, and others for even more fine-grained configuration.

LXC is used as the default runtime for Incus, a container hypervisor exposing a well-designed and stable REST-api on top of it.

Kernel Requirements

LXC runs on any kernel from 2.6.32 onwards. All it requires is a functional C compiler. LXC works on all architectures that provide the necessary kernel features. This includes (but isn't limited to):

  • i686
  • x86_64
  • ppc, ppc64, ppc64le
  • riscv64
  • s390x
  • armv7l, arm64
  • loongarch64

LXC also supports at least the following C standard libraries:

  • glibc
  • musl
  • bionic (Android's libc)

Backwards Compatibility

LXC has always focused on strong backwards compatibility. In fact, the API hasn't been broken from release 1.0.0 onwards. Main LXC is currently at version 4.*.*.

Reporting Security Issues

The LXC project has a good reputation in handling security issues quickly and efficiently. If you think you've found a potential security issue, please report it by e-mail to security (at) linuxcontainers (dot) org.

For further details please have a look at

Becoming Active in LXC development

We always welcome new contributors and are happy to provide guidance when necessary. LXC follows the kernel coding conventions. This means we only require that each commit includes a Signed-off-by line. The coding style we use is identical to the one used by the Linux kernel. You can find a detailed introduction at:

and should also take a look at the CONTRIBUTING file in this repo.

If you want to become more active it is usually also a good idea to show up in the LXC IRC channel #lxc-dev on irc.libera.chat. We try to do all development out in the open and discussion of new features or bugs is done either in appropriate GitHub issues or on IRC.

When thinking about making security critical contributions or substantial changes it is usually a good idea to ping the developers first and ask whether a PR would be accepted.

Semantic Versioning

LXC and its related projects strictly adhere to a semantic versioning scheme.

Downloading the current source code

Source for the latest released version can always be downloaded from

You can browse the up to the minute source code and change history online

Building LXC

Without considering distribution specific details a simple

meson setup -Dprefix=/usr build
meson compile -C build

is usually sufficient.

Getting help

When you find you need help, the LXC projects provides you with several options.

Discuss Forum

We maintain a discuss forum at

where you can get support.

IRC

You can find us in #lxc on irc.libera.chat.

Mailing Lists

You can check out one of the two LXC mailing list archives and register if interested:

linuxcontainers.org's People

Contributors

anthonydillon avatar bensmrs avatar clarkwinkelmann avatar come-maiz avatar dann1 avatar deadlight avatar dmole avatar edlerd avatar ervinismu avatar evgeni avatar fearthebadger avatar galeksandrp avatar hallyn avatar hnakamur avatar itsnikolay avatar javacruft avatar m-shibata avatar petermichaux avatar ru-fu avatar sergiusens avatar shazaum avatar stgraber avatar t-var-s avatar techtonik avatar tenforward avatar toby63 avatar togawa-sakiko avatar websnke avatar ysbnim avatar zipperer 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

Watchers

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

linuxcontainers.org's Issues

LXC apparently updated “until April 2019”

From the front page: “LXC is production ready with LXC 1.0 getting 5 years of security updates and bugfixes (until April 2019).”

I‘m writing this on 29th April 2019, so that statement is … not at all reassuring.

The LXC introduction says “LXC 1.0 will be supported until June 1st 2019”, and also mentions an LXC 2.0. Probably 2.0 should be mentioned on the front page instead of 1.0.

[Request] Changes to the Readme.md

Additions:

  • mention that we would like to see translations (right now this is not mentioned)
    • and maybe a status of translations and participants (if possible)
  • Writing Guidelines:
    • mostly Markdown with a bit of html
    • I could add some specifics I included, such as special css-classes for notes etc.
    • different "styles" for website versus documentation
  • link directly to open issues, for example: Issue about the Advanced Guide
  • mention Ideas and Feature Requests (and not just "Bug Reports")

Corrections:

  • python3-markdown (<3.0.0), is not <3.0.0 anymore

Comment:
I can work on Pull requests for most of this, but I wanted to hear oppinions first 😄.

Try it backend documentation

I want to extend whitelist for outgoing requests, so that testing anything with Fedora becomes possible, but can't find where try it backend is located. Worth mentioning in README.md.

Changes for "Getting Started cli"

Context:
https://linuxcontainers.org/lxd/getting-started-cli/
https://discuss.linuxcontainers.org/t/proposed-additions-and-changes-for-getting-started/7804
https://discuss.linuxcontainers.org/t/request-add-more-info-about-images-into-getting-started/7738

Todo:
Technical:

  • TOC (Table of Content)
  • Admonitions
  • Footnotes
  • Attribution Lists (use specific html classes)
  • FencedCode
  • [blocked] other style for tables (reduced width, vertical borders) (also see: #420)

Content:

  • Initial Configuration
  • VM's [1]
  • Launch Instances [1]
  • Images [1]
  • Links [1]

Moved Profiles and Tips&Tricks to the Advanced Guide (#413).

[1]: see pull request #433


Note: This is of course not urgent, but because I haven't received an answer in the forum, I wanted to post it here, so it would not be forgotten 🙂 .

I would like to change some things in the "getting started-doc", but before I start to write a pull request for it, I would appreciate to get some answers (so I (and maybe others) know what you want to see included and what not):

  1. Regarding general questions for editing (what is allowed etc.):
  • can I add links to external websites, like:
  • I guess everything should be as short as possible?
  1. Regarding my ideas for changes;
    I would add more info about:
  • the options of lxd-init (like answers to "what is clustering?")

  • VMs:
    should I seperate the vm-part from the container-part or mingle it (most topics like images, profiles etc. apply to both)?

  • details for "lxc launch" (like requested in this issue)

  • profiles (only short info + links)

  • (maybe later) cloud-init (only short info + links):

  • images:

    • "official" images (how to list, find and use them)
    • "download the images yourself"
      • maybe only a link to seperate documentation (would need a new page, maybe "images")
      • otherwise link to imageserver and how to download & import the images
    • "building your own images":
    • link to image handling or include it in new document ("images")
  • storage (pools) (only short info + links)

2.a) I would also like to add:

  1. Regarding the layout of the document (what kind of layout/style do you prefer?);
    I would like to:

LXC Dropdown: Re-arranging things to make info more clear

As mentioned previously, I was/am planning on adding the full CLI output of the Python-lxc API to the website.

However, I see that the current way it is arranged is not so clear.

What I propose is:

Click on 'LXC' - Dropdown appears (currently operational and will not change)
Click/Scroll on 'Documentation' and a side-menu (similar to how man-pages works)

When doing the click/scroll over 'Documentation', the results we get would be:

  • Main/other-name : which would contain most of the top-level information already present when selecting 'Documentation' currently
  • C : Providing the full C API spec with the current example, etc.
  • Python : Same as C
  • All-other-languages : We can place these as time goes by

The only (slight) problem I have is that I am unsure how to split the 'Documentation' into a menu option itself with sub-menus.

Any suggestions on this will help and I will then go about doing it myself.

Advanced Guide for LXD

We added an advanced guide on the linuxcontainers.org website:
https://linuxcontainers.org/lxd/advanced-guide/

Below you find a Todo-list.
You can help by:

  • creating a pull request to add content or
  • adding a comment with ideas for changes or further content.

You find the source-file of the advanced guide here:
https://github.com/lxc/linuxcontainers.org/blob/master/content/lxd/advanced-guide.md

Todo-List:
Improvements:

  • add links to manpages (once #471 is implemented)

Content:

Done:

  • Configuration of instances (lxc launch, profiles) (added in #434)
    Note: includes only a description on how to apply options, so no description of the options themself
  • Cloud-init (added in #435)
  • Remote Servers (see also #431) (added in #435)
  • Images - part 2 (build images) (added in #437)
  • Command Aliases (added in #437)
  • Further Links (added in #434)

Sorted out:
Technical:

  • [blocked] other style for tables (reduced width, vertical borders) (see: #420) [H]

Original Post:
We (the LXD-community, including the developers) could create an additional "Advanced Guide" that we link to in "Getting started", that could include topics like:

  • networks
  • storage pools
  • devices
  • cloud-init
  • Clustering
    etc.

Advantages:

  • This could be a good introduction to advanced topics for new users.
  • It could also help to seperate in-depth-topics from the Getting Started-doc.
  • The regular documentation could be kept technical and rather short-summarized, while an advanced guide could formulate things in more detail.

apt-get operations fail on dist-upgrade and autoremove

I was trying out the LXD Container on https://linuxcontainers.org/lxd/try-it/?id=cf717a30-7e47-4bdb-bfba-9f62373f7033#snapshots

And it causes an error when executing the system distribution upgrade command

 root@tryit-capital:~# lxc exec first -- apt-get dist-upgrade -y

I believe this is occuring cause there isn't sudo permissions within the container, or some services aren't active/enabled ? As the following problems are occurring:

Setting up systemd (237-3ubuntu10.31) ...                                                                                                              
Failed to try-restart systemd-networkd.service: Access denied                                                                                          
See system logs and 'systemctl status systemd-networkd.service' for details.                                                                          
Failed to try-restart systemd-resolved.service: Access denied                                                                                          
See system logs and 'systemctl status systemd-resolved.service' for details.                                                                          
Failed to try-restart systemd-timesyncd.service: Access denied                                                                                        
See system logs and 'systemctl status systemd-timesyncd.service' for details.                                                                          
Failed to try-restart systemd-journald.service: Access denied                                                                                          
See system logs and 'systemctl status systemd-journald.service' for details.  
Setting up udev (237-3ubuntu10.31) ...                                                                                                                
Failed to reload daemon: Access denied                                                                                                                
Failed to retrieve unit state: Access denied    

invoke-rc.d: could not determine current runlevel                                                                                                      
Failed to reload daemon: Access denied                                                                                                                
Failed to retrieve unit state: Access denied                                                                                                          
                                                                                                                                                       
Failed to restart udev.service: Access denied                                                                                                          
See system logs and 'systemctl status udev.service' for details.                                                                                      
invoke-rc.d: initscript udev, action "restart" failed.                                                                                                
Failed to get properties: Access denied                                                                                                                
dpkg: error processing package udev (--configure):                                                                                                    
 installed udev package post-installation script subprocess returned error exit status 4  

Processing triggers for libc-bin (2.27-3ubuntu1) ...                                                                                                  
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...                                                                                                  
Processing triggers for dbus (1.12.2-1ubuntu1.1) ...                                                                                                  
Failed to open connection to "system" message bus: Failed to query AppArmor policy: Permission denied                                                  
Processing triggers for mime-support (3.60ubuntu1) ...                                                                                                
Processing triggers for initramfs-tools (0.130ubuntu3.8) ...                                                                                          
Errors were encountered while processing:                                                                                                              
 udev                                                                                                                                                  
E: Sub-process /usr/bin/dpkg returned an error code (1)                                                                                                
W: Operation was interrupted before it could finish                    

=============================================
This command also yields problems:

root@tryit-capital:~# lxc exec first -- apt-get autoremove --purge -y
Reading package lists... Done                                                                                                                          
Building dependency tree                                                                                                                              
Reading state information... Done                                                                                                                      
The following packages will be REMOVED:                                                                                                                
  libfreetype6*                                                                                                                                        
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.                                                                                        
1 not fully installed or removed.                                                                                                                      
After this operation, 940 kB disk space will be freed.                                                                                                
(Reading database ... 28645 files and directories currently installed.)                                                                                
Removing libfreetype6:amd64 (2.8.1-2ubuntu2) ...                                                                                                      
Setting up udev (237-3ubuntu10.31) ...                                                                                                                
Failed to reload daemon: Access denied    
Failed to retrieve unit state: Access denied                                                                                                          
invoke-rc.d: could not determine current runlevel
Failed to restart udev.service: Access denied                                                                                                          
See system logs and 'systemctl status udev.service' for details.                                                                                      
invoke-rc.d: initscript udev, action "restart" failed.                                                                                                
Failed to get properties: Access denied
                      dpkg: error processing package udev (--configure):                                                                                                     
installed udev package post-installation script subprocess returned error exit status 4                                                              
Processing triggers for libc-bin (2.27-3ubuntu1) ...                                                                                                  
Errors were encountered while processing:                                                                                                              
 udev                                                                                                                                                  
E: Sub-process /usr/bin/dpkg returned an error code (1)                                                                                                
W: Operation was interrupted before it could finish  

CORS allowed in domain

Hi, the app "lxd-gui" (https://github.com/dobin/lxd-webgui) can't do make GET to images.linuxcontainers.org because don't allow others origins.
Can you enable it?

╰─$ curl -XOPTIONS https://uk.images.linuxcontainers.org/1.0/images -I
HTTP/1.1 200 OK
Date: Tue, 31 Oct 2017 14:10:48 GMT
Server: Apache/2.4.7 (Ubuntu)
Strict-Transport-Security: max-age=31536000
Allow: POST,OPTIONS,GET,HEAD,TRACE
Content-Length: 0
Content-Type: application/json

Create issue for release announcements

Hi Stéphane,

Is it possible to crate issues or PRs for release announcements like ce97519? It is convenient to monitor progress on Linux containers through GiHub notification system, which only notifies about issues and PRs.

[Discussion] remote servers section in documentation

While I was editing getting-started-cli I noticed that the different types of remote servers are not clearly seperated.

I suggest seperating them with different commands, for example:

  • lxc imageserver - for imageservers
    (The list could include LXD-Servers as well, but on a seperate list below the regular imageservers)
  • lxc remote - only for LXD servers

Advantages:

  • This way we can explain the difference better to new users
  • A clear seperation avoids confusion
  • People who use many LXD-Servers or imageservers have a clear overview as well

Information listed for opensuse 15.0 image unprivileged containerization is misleading

Currently, on http://us.images.linuxcontainers.org/, it leaves the undersiable impression that openSUSE 15.0 supports unprivileged containerization from LXC 1.1 and up. At least for now, that's misleading, see lxc/lxc#1678. While this is fixed in systemd 236, openSUSE 15.0 is shipped with systemd 234. I've opened a downstream bug report about backporting systemd/systemd@d3070fb.

EDIT: Actually, I stumbled over the lxc/lxc#1713 that fixes this problem, so the information is correct. I have to look into what/which version of cgfs is currently being used in Proxmox.

pivot_root in LXC 1.1.0 release announcement

One more question.
At the item in "Change in behavior"

core: pivot_root is now done with the use of lxc.pivotdir, as a result this option is now considered deprecated and will be removed in upcoming releases.

"with" is correctly "without"?

  • core: pivot_root is now done without the use of lxc.pivotdir, as a result this option is now considered deprecated and will be removed in upcoming releases.

[Request] Move or link docs here

I noticed that the documentation is saved within the repos of lxd etc.

While I understand that it is this way, because developers maybe favor it to be near the code, I still wanted to suggest to move, or at least link it here.
There already seems to be a place for this:
https://github.com/lxc/linuxcontainers.org/tree/master/content/lxd/docs

Reasons/Advantages:

  • the documentation is also a part of the website
  • issues regarding the docs could be placed here
  • docs could be downloaded with the website (?: I don't know if git can follow links, i never tested that)

getting-started.md needs revision for cgroup preperation by fully unprivileged users

In https://github.com/lxc/linuxcontainers.org/blob/master/content/lxc/getting-started.md it is said that

Now, everything below assumes a recent Ubuntu system or another Linux distribution which offers a similar experience (recent kernel, recent version of shadow, cgmanager and default uid/gid allocation).

Just before you create your first container, you probably should logout and login again, or even reboot your machine to make sure that your user is placed in the right cgroups. (This is only required if cgmanager wasn't installed on your machine prior to you installing LXC.)

As cgmanager is considered retired, it should be updated to libpam-cgfs at least for hybrid cgroup hierarchy. In addition, it is instructed at lxc/lxc#3242 (comment) to use

systemd-run --unit=myshell --user --scope -p "Delegate=yes" lxc-start

This trick for pure cgroup2 hierarchy should also be included in getting-started.md

Mention lxd-p2c in getting started

Having spent a few weeks getting to grips with the basics of lxd, I have a couple of suggested additions /improvements that could be made to the lxd getting started guide ( https://linuxcontainers.org/lxd/getting-started-cli/ ) that would've saved me days or weeks of troubleshooting, searching and experimentation.

The first is in respect to lxd networking, specifically the bridge configuration. After days spent reading the lxd forums and trying many configs, I finally worked out why I couldn't get networking to work in any of my containers. It turns out that you have to explicitly disable IPv6 in the lxdbr0 configuration for both NAT and addressing or else it breaks any IPv4 only hosts networking. This may seem obvious but it really isn't and I didn't see this suggested in any of the related lxd blog or forum posts I found and nor was this suggested to me by anyone in the lxcontainers IRC channel.

I would recommend either modifying/extending the Initial configuration section of the getting started guide to cover this or adding a new networking section immediately after that section of the guide that would read something like this:


LXD networking

In order for your lxd containers to get network access, a bridged network device has to be created on your lxd host, this device (usually called lxdbr0) has to be attached to an lxd profile (usually 'default') and this profile needs to be added to your container(s) so that they can access the network. Running lxd init and answering yes when asked about creating a new local network bridge will do nearly all of the required configuration to enable networking for lxd but your IPv4 hosts won't work unless you specifically tell lxd to disable IPv6 NAT and addressing in your bridge configuration.

To disable IPv6, presuming you used lxd init to create a bridged interface called lxdbr0, you would run the command:

# lxc network edit lxdbr0

Then edit it so that the bridge configuration looks something like this:

config:
  ipv4.address: 146.87.119.1/24
  ipv4.nat: "true"
  ipv6.address: none
  ipv6.nat: "false"
description: ""
name: lxdbr0
type: bridge
used_by:
- /1.0/containers/test
managed: true
status: Created
locations:
- none

There is usually no need to restart any containers after changing your lxd host network settings, the changes are applied instantly.


The other addition I would suggest adding to the getting started guide is that it makes no mention of lxd-p2c to ease the process of creating containers from existing servers. I posted a short guide on the usage of lxd-p2c on the forums here https://discuss.linuxcontainers.org/t/howto-use-lxd-p2c/3574/3

Thanks

CentOS Guest PrivateTmp fail

When starting services in a CentOS guest, many of them want to create private temp directories. This fails under LXC. Widely used services such as Apache, MariaDB and Cyrus Imap are affected and fail to start. This has been discussed in several places on the internet, mainly the Proxmox forums [1]. So you may already be very well aware of the issue. The workaround is to replace

PrivateTmp=true

with

PrivateTmp=false

in the respective configuration file under /usr/lib/systemd/system/

It would be nice, if the workaround would be included or referenced in the documentation on linuxcontainers.org. [2]

[1] https://www.google.de/search?q=PrivateTmp+lxc#q=%22PrivateTmp%22+%22lxc%22

[2] https://linuxcontainers.org/lxd/getting-started-cli/

Links don't work

No link on the frontpage nor the menu is working.
I can't imagine how to deploy a change and not even look at a single link and also not having automates link checking.

[Feature Request] Search machine

It would be good to implement a way to search the website.

I remember reading about it (found it here: https://discuss.linuxcontainers.org/t/new-self-hosted-documentation-site/5540/4).
@stgraber suggested implementing a google search.
For privacy reasons I would advocate for DuckDuckgo or similar instead.

Regarding the difficulty implementing it, could you maybe implement a search box, like
https://duckduckgo.com/search_box ?
It works with iframe.

Update:
Example for implementation:

<iframe src="https://duckduckgo.com/search.html?width=220&site=https://linuxcontainers.org&prefill=Search with DuckDuckGo&bgcolor=ffffff" style="overflow:hidden;margin:0;padding:0;width:278px;height:40px;" frameborder="0"></iframe>

Add an About page

On this page you could describe the usual things:
-who you are
-what you do
etc.

[Feature Request] Make RBAC usable with tls authentication on LXD

To limit user access based on tls certificates a command or flag is needed to assign a role to a client certificate.

Adding a trust certificate currently works like this
lxc config trust add <cert>

A flag would suffice to set a role, like:
lxc config trust add <cert> --role user
lxc config trust add <cert> --role admin
If a cert would be added twice, the last rule setting should get preference.

Additionally a default role setting should be set in the core settings, like
core.trust_default_role: 'readonly'

Try it scrollback buffer

It is impossible to copy/paste commands and results from Try it server, because they scroll away after screenful of lines and there is no way to view them back.

LXC 1.1.0 release announcement

I have a question.
At the "New features" item "lxc-lua: Now a C binary installed by default (was a lua script)", "lxc-lua" is correctly "lxc-top"?

Fix links to use slash-ending ?

I just noticed that all links on the website point to URLs ending with no slash (hardcoded), but that the generated website uses the index.html trick to display "clean" slash-ended urls.

Even if the server returns 301 responses, this still means a lot of doubled queries where one would be enough, not counting that nothing else can load before those two requests are finished. As a web dev I mainly think of new visitors for who the speed is a big factor.

The server isn't really slow but this probably wouldn't cost much to make it a bit faster ? Or does it work like this on purpose ? (would be strange)

I can work on a PR if you want. Or maybe is there a better way than editing every file under content/ ?

Add Fanctl?

Hi guys, im pretty impressed with all the work you've done so far on LXC, LXD and now FANCTL. Shall we add them to linuxcontainers org?

Ubuntu 18.04 not listed anywhere. Netplan, nothing about it. All the stuff I googled including YouTube videos is ALL older stuff.

Hello.

I got forwarded here from https://linuxcontainers.org/lxd/getting-started-cli/. But I landed on a lxc page.

I am not sure if this is an issue what I will write below, but I will mention it because it is a major road block for me.

First, thank you for all the work done.

I have a very difficult time getting LXD containers to start working properly on Ubuntu 18.04 server. Most specifically having them obtain automatically an IP address from the router via DHCP. All the instructions I found are about old stuff and nothing about new stuff, e.g., netplan.

I think, it would be nice if there were instructions going further than just "lxd init" and creating a container with an 10.x.x.x address.

The part where I need instructions start first afterwards that. For example to have the newly created container get an ip address to which I can bind a domain (not the 10.x.x.x), etcetera.

And I found nothing anywhere. Really! :)

Any help or feedback would be much appreciated.

Thank you.

Vanilla: Feedback widget isn't working

The feedback widget that's supposed to show up at the end of a try-it session (when reaching the final page in the step by step instructions) isn't showing up after the port to vanilla.

If forced to show up, the star rating widget doesn't show up at all and the rest of the form looks oddly spaced.

@anthonydillon

console getty respawns and crashes, spamming the log

Console getty keeps respawning in the guests, spamming the logs. The issue was discussed here:

lxc/incus#444

Currently the proposed changes to the templates from images.linuxcontainers.org don't seem to be implemented. It took me an embarrassingly long time to find the correct commands to disable getty.

For a Centos 7 guest they are as follows:

systemctl stop console-getty
systemctl disable console-getty
systemctl mask console-getty

If you don't mask, console-getty will be automatically enabled on the next boot.

Debian Jessie guests are a bit different.

systemctl stop console-getty.service
systemctl stop [email protected]
systemctl stop [email protected]
systemctl stop [email protected]
systemctl stop [email protected]

systemctl disable console-getty.service
systemctl disable [email protected]
systemctl disable [email protected]
systemctl disable [email protected]
systemctl disable [email protected]

systemctl mask console-getty.service
systemctl mask [email protected]
systemctl mask [email protected]
systemctl mask [email protected]
systemctl mask [email protected]

Until the proposed changes to the templates are implemented or another solution is found, it would be really nice for people like me, if the above commands found their way into the documentation. The first place I looked was /etc/inittab, where these settings were changed in Debian before Jessie.

For reference, the respective log looks like this for Debian Jessie:

Dec 19 18:05:15 tttdebian systemd[1]: console-getty.service has no holdoff time, scheduling restart.
Dec 19 18:05:15 tttdebian systemd[1]: [email protected] has no holdoff time, scheduling restart.
Dec 19 18:05:15 tttdebian systemd[1]: [email protected] has no holdoff time, scheduling restart.
Dec 19 18:05:15 tttdebian systemd[1]: [email protected] has no holdoff time, scheduling restart.
Dec 19 18:05:15 tttdebian systemd[1]: Stopping Getty on tty4...
Dec 19 18:05:15 tttdebian systemd[1]: Starting Getty on tty4...
Dec 19 18:05:15 tttdebian systemd[1]: Started Getty on tty4.
Dec 19 18:05:15 tttdebian systemd[1]: Stopping Getty on tty3...
Dec 19 18:05:15 tttdebian systemd[1]: Starting Getty on tty3...
Dec 19 18:05:15 tttdebian systemd[1]: Started Getty on tty3.
Dec 19 18:05:15 tttdebian systemd[1]: Stopping Getty on tty1...
Dec 19 18:05:15 tttdebian systemd[1]: Starting Getty on tty1...
Dec 19 18:05:15 tttdebian systemd[1]: Started Getty on tty1.
Dec 19 18:05:15 tttdebian systemd[1]: Stopping Console Getty...
Dec 19 18:05:15 tttdebian systemd[1]: Starting Console Getty...
Dec 19 18:05:15 tttdebian systemd[1]: Started Console Getty.
Dec 19 18:05:15 tttdebian agetty[373]: /dev/console: Operation not permitted
Dec 19 18:05:15 tttdebian agetty[370]: /dev/tty1: No such file or directory
Dec 19 18:05:15 tttdebian agetty[367]: /dev/tty3: No such file or directory
Dec 19 18:05:15 tttdebian agetty[364]: /dev/tty4: No such file or directory

For Centos 7:

Dec 19 18:06:50 tcentos systemd[1]: Starting Console Getty...
Dec 19 18:06:50 tcentos agetty[566]: /dev/console: Operation not permitted
Dec 19 18:07:00 tcentos systemd[1]: console-getty.service has no holdoff time, scheduling restart.
Dec 19 18:07:00 tcentos systemd[1]: Started Console Getty.

inconsistent image fingerprint on uk.images.linuxcontainers.org/1.0/images

Hi there,

with @BrunnerLivio we notice some inconsistency in the images on the https://images.linuxcontainers.org server.

basically the image listed do have a consistent fingerprint when accessing the image details as depicted in the following code:

curl https://uk.images.linuxcontainers.org/1.0/images | python -m json.tool                                            
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 23352  100 23352    0     0  23352      0  0:00:01 --:--:--  0:00:01 91218
{
    "metadata": [
        "/1.0/images/17ba09371cc3443715d6ce8733c1cc226645863c139450eb503d8eb08a1f7250",
        "/1.0/images/e2a9549f1f318c8faa64963c67efa95ced8572368127666cf6760a8eb7ed0853",
        "/1.0/images/0c03fddf670309012e6bb7bd8545c6c0d6b725ffb84f2dab67d8542a44e3c50b",
        "/1.0/images/f79d48030270234045acba9239cba77dbd3a0ea6e77ab1ec741834dbbb58ee78",
        "/1.0/images/adb7164bbcdcf14a1be1dc8dfecd2825333e6d40757e053617ef9640f5e99fd5",
        "/1.0/images/2bc172159ce57bbb02a1372ad5016f8f3374c709a98760a1059405363424fb50",
        "/1.0/images/0c252ff1d64978e89052f81bc71c91912ed59521658c260facf9cdc1af1b0553",
        "/1.0/images/8884bce09c6b6e5ca573a833e5fb7872c1e3ef44807e9806bd693ccbc97f7d27",
        "/1.0/images/3453e9af2bec38845bb8afa393e6d3e3ba81d449d82ac1748c06683002b7a1c0",
        "/1.0/images/31b1f1fdc46d556963e84b3dd9d482be03916331730d159c89fb8ab129c082f0",
        "/1.0/images/bd847ed151fafbc8d5bf590f0a35cc3fbec87bbda79200ad15564e05d6fa97a6",
        "/1.0/images/faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6",
       [...]
        "/1.0/images/c6e9b0dcca19764861773c7808d8cb472781009601402142034a818f52c48a55"
    ],
    "status": "Success",
    "status_code": 200,
    "type": "sync"
}

Getting some image details of the /1.0/images/faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6 results in
the same fingerprint:
"fingerprint": "faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6",

curl https://uk.images.linuxcontainers.org/1.0/images/faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6 | python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   790  100   790    0     0    790      0  0:00:01 --:--:--  0:00:01  1850
{
    "metadata": {
        "aliases": [
            {
                "description": "Alpine 3.5 (amd64) (default)",
                "name": "alpine/3.5/amd64/default",
                "target": "alpine/3.5/amd64/default"
            },
            {
                "description": "Alpine 3.5 (amd64)",
                "name": "alpine/3.5/amd64",
                "target": "alpine/3.5/amd64"
            }
        ],
        "architecture": "x86_64",
        "created_at": "2018-03-08T18:00:24Z",
        "expires_at": "1970-01-01T00:00:00Z",
        "filename": "alpine-3.5-amd64-default-20180308_17:50.tar.xz",
        "fingerprint": "faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6",
        "properties": {
            "architecture": "amd64",
            "build": "20180308_17:50",
            "description": "Alpine 3.5 (amd64) (20180308_17:50)",
            "distribution": "alpine",
            "release": "3.5"
        },
        "public": true,
        "size": 1749138,
        "uploaded_at": "2018-03-08T18:00:24Z"
    },
    "status": "Success",
    "status_code": 200,
    "type": "sync"
}

Now comes the tricky part, using the lxc (lxc version 2.21) to copy this image from with this fingerprint locally fails:

lxc image copy images:faf04466a305b2a874284b5cd54ddd7513e6e734c02de1da71b4a53e016103f6 local: --copy-aliases           
error: The requested image couldn't be found.

It seems that the exposed REST-API for this server is delivering erroneous/outdated data...

Using the lxc command to get some more information about the alias target image, results in a complete other image Fingerprint :(

lxc image info images:alpine/3.5/amd64                                                                                 
Fingerprint: 9677bdac722171ddc16f3a77c800f840d51e1c46ee7e627c5141d8b237220f5f
Size: 1.70MB
Architecture: x86_64
Public: yes
Timestamps:
    Created: 2018/03/08 00:00 UTC
    Uploaded: 2018/03/08 00:00 UTC
    Expires: never
    Last used: never
Properties:
    serial: 20180308_17:50
    description: Alpine 3.5 amd64 (20180308_17:50)
    os: Alpine
    release: 3.5
    architecture: amd64
Aliases:
    - alpine/3.5/default
    - alpine/3.5/default/amd64
    - alpine/3.5
    - alpine/3.5/amd64
Cached: no
Auto update: disabled

After some digging we noticed that a really small amount of listed image correspond to the proper fingerprint:

lxc image list images: --format yaml | grep -i fingerprint | awk '{print $2}' > lxc-images.fingerprints
curl https://uk.images.linuxcontainers.org/1.0/images | python -m json.tool | grep -i images | cut -d '/' -f4 | tr -d '[",]' > linuxcontainers.org.fingerprints
# comparison
for im in `cat lxc-images.fingerprints`; do grep $im linuxcontainers.org.fingerprints; done                            
4cd85aceb09377aaaf0f67037fa9c00dee46d358012077174a4fe7c1f2b1f000
b1aeef2293c0bcc4639983a52e5eff47600361a27c4e2c5b0b3417362f68c44d
1fd0905297acbd9564b9556b22cc0fb6337c7f3c633ed9be94423bdefcb5bacb
a14a23a034aab22eb4ebbb5826bcb21862c41f4ad07aeb922dcdb68bc46d76e9
fc2de6fd2745b5e94a73ec48ea5c6c3391e82f555d2d9e9c06a0147637cf18e6
6fce0e9befe843135fc6e5c00dd2ef7158feba80cf0eb022b097d967d318d47d

Well the initial idea was to use the LXD rest-api to list the content of the https://images.linuxcontainers.org server and to make some copy operation via webui over this API as specified in https://github.com/lxc/lxd/blob/master/doc/rest-api.md

1.0/images/*

Coud someone have a look at this issue?
Is there an API description to access the simplestreams protocol so it's consistent with the lxc command?

Basically we would need the complete list of images 1.0/images/* and their details 1.0/images/<image_fingerprint>

Cheers
Eric

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.