Wednesday, July 23, 2014

OpenStack : Neutron : Floating IPs in database

$ mysql -u root -p
Enter password:

mysql> connect ovs_neutron;

mysql> show tables;
+---------------------------+
| Tables_in_ovs_neutron     |
+---------------------------+
| agents                    |
| alembic_version           |
| allowedaddresspairs       |
| dnsnameservers            |
| externalnetworks          |
| extradhcpopts             |
| floatingips               |
| ipallocationpools         |
| ipallocations             |
| ipavailabilityranges      |
| networkdhcpagentbindings  |
| networks                  |
| ovs_network_bindings      |
| ovs_tunnel_allocations    |
| ovs_tunnel_endpoints      |
| ovs_vlan_allocations      |
| portbindingports          |
| ports                     |
| quotas                    |
| routerl3agentbindings     |
| routerroutes              |
| routers                   |
| securitygroupportbindings |
| securitygrouprules        |
| securitygroups            |
| servicedefinitions        |
| servicetypes              |
| subnetroutes              |
| subnets                   |
+---------------------------+

mysql> desc floatingips;
+----------------------+--------------+------+-----+---------+-------+
| Field                | Type         | Null | Key | Default | Extra |
+----------------------+--------------+------+-----+---------+-------+
| tenant_id            | varchar(255) | YES  |     | NULL    |       |
| id                   | varchar(36)  | NO   | PRI | NULL    |       |
| floating_ip_address  | varchar(64)  | NO   |     | NULL    |       |
| floating_network_id  | varchar(36)  | NO   |     | NULL    |       |
| floating_port_id     | varchar(36)  | NO   | MUL | NULL    |       |
| fixed_port_id        | varchar(36)  | YES  | MUL | NULL    |       |
| fixed_ip_address     | varchar(64)  | YES  |     | NULL    |       |
| router_id            | varchar(36)  | YES  | MUL | NULL    |       |
| last_known_router_id | varchar(36)  | YES  |     | NULL    |       |
| status               | varchar(16)  | YES  |     | NULL    |       |
+----------------------+--------------+------+-----+---------+-------+

mysql> select floating_ip_address from floatingips;
+---------------------+
| floating_ip_address |
+---------------------+
| 172.24.4.236        |
| 172.24.4.231        |
| 172.24.4.232        |
+---------------------+



Thursday, July 17, 2014

OpenStack : Nova : start a nova instance with SHUTOFF status

$ nova list
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+
| ID                                   | Name          | Status  | Task State | Power State | Networks                       |
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+
| affcd01a-9669-4b8f-a89c-5152966d8981 | centos-test01 | SHUTOFF | -          | Shutdown    | private=10.0.0.9, 172.24.4.232 |
| 0c84e296-82d1-487b-bb5f-576b4c73607f | fedora-test01 | SHUTOFF | -          | Shutdown    | private=10.0.0.8, 172.24.4.231 |
| c936ede3-4ec6-4e36-8b1e-3c319badc9c5 | jumphost      | SHUTOFF | -          | Shutdown    | private=10.0.0.2, 172.24.4.236 |
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+

$ nova start affcd01a-9669-4b8f-a89c-5152966d8981

$ nova list
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+
| ID                                   | Name          | Status  | Task State | Power State | Networks                       |
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+
| affcd01a-9669-4b8f-a89c-5152966d8981 | centos-test01 | ACTIVE  | -          | Running     | private=10.0.0.9, 172.24.4.232 |
| 0c84e296-82d1-487b-bb5f-576b4c73607f | fedora-test01 | SHUTOFF | -          | Shutdown    | private=10.0.0.8, 172.24.4.231 |
| c936ede3-4ec6-4e36-8b1e-3c319badc9c5 | jumphost      | SHUTOFF | -          | Shutdown    | private=10.0.0.2, 172.24.4.236 |
+--------------------------------------+---------------+---------+------------+-------------+--------------------------------+

OpenStack : Neutron : Neutron restart

Encountered the following problem :

$ neutron agent-list
Connection to neutron failed: Maximum attempts reached

Solution :

# service neutron-server restart

$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

Tuesday, July 15, 2014

Install Eclipse on CentOS

Eclipse Download page is here

After download, in my home directory :

$ gunzip eclipse-standard-luna-R-linux-gtk-x86_64.tar.gz

$ tar tvf eclipse-standard-luna-R-linux-gtk-x86_64.tar

$ cd eclipse

$ vi eclipse.ini (I don't see anything needs to be modified)

Since I have openjdk 1.7 already, I am ready to go

$ eclipse &

Because I need to Python piece, I went to http://www.eclipse.org/users/

And drag to the PyDev "Install" mark to Eclipse workspace, then it will start install PyDev for Eclipse and Pydev Mylyn Integration.




Unlock Keyring

My CentOS server pops up a window and keeps asking me about entering password to unlock keyring, which I don't have it. Here is how it was resolved.

cd ~/.gnome2/keyrings
mv login.keyring login.keyring.bak

Monday, July 7, 2014

OpenStack : Neutron : Agent information lookup

To list agents 

[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 3b256809-483d-4c0c-b6ad-b4a05bafa72d
+---------------------+----------------------------------------------------------+
| Field               | Value                                                    |
+---------------------+----------------------------------------------------------+
| admin_state_up      | True                                                     |
| agent_type          | DHCP agent                                               |
| alive               | True                                                     |
| binary              | neutron-dhcp-agent                                       |
| configurations      | {                                                        |
|                     |      "subnets": 1,                                       |
|                     |      "use_namespaces": true,                             |
|                     |      "dhcp_lease_duration": 86400,                       |
|                     |      "dhcp_driver": "neutron.agent.linux.dhcp.Dnsmasq",  |
|                     |      "networks": 1,                                      |
|                     |      "ports": 5                                          |
|                     | }                                                        |
| created_at          | 2014-05-20 23:16:52                                      |
| description         |                                                          |
| heartbeat_timestamp | 2014-07-08 02:22:51                                      |
| host                | novo                                                     |
| id                  | 3b256809-483d-4c0c-b6ad-b4a05bafa72d                     |
| started_at          | 2014-07-08 01:03:19                                      |
| topic               | dhcp_agent                                               |
+---------------------+----------------------------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 3c73594b-b16c-41ba-bd43-7ce67dc69a82
+---------------------+--------------------------------------+
| Field               | Value                                |
+---------------------+--------------------------------------+
| admin_state_up      | True                                 |
| agent_type          | Open vSwitch agent                   |
| alive               | True                                 |
| binary              | neutron-openvswitch-agent            |
| configurations      | {                                    |
|                     |      "tunnel_types": [],             |
|                     |      "tunneling_ip": "",             |
|                     |      "bridge_mappings": {},          |
|                     |      "l2_population": false,         |
|                     |      "devices": 5                    |
|                     | }                                    |
| created_at          | 2014-05-20 23:16:22                  |
| description         |                                      |
| heartbeat_timestamp | 2014-07-08 02:24:19                  |
| host                | novo                                 |
| id                  | 3c73594b-b16c-41ba-bd43-7ce67dc69a82 |
| started_at          | 2014-07-06 01:41:07                  |
| topic               | N/A                                  |
+---------------------+--------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b
+---------------------+-------------------------------------------------------------------------------+
| Field               | Value                                                                         |
+---------------------+-------------------------------------------------------------------------------+
| admin_state_up      | True                                                                          |
| agent_type          | L3 agent                                                                      |
| alive               | True                                                                          |
| binary              | neutron-l3-agent                                                              |
| configurations      | {                                                                             |
|                     |      "router_id": "",                                                         |
|                     |      "gateway_external_network_id": "",                                       |
|                     |      "handle_internal_only_routers": true,                                    |
|                     |      "use_namespaces": true,                                                  |
|                     |      "routers": 1,                                                            |
|                     |      "interfaces": 1,                                                         |
|                     |      "floating_ips": 3,                                                       |
|                     |      "interface_driver": "neutron.agent.linux.interface.OVSInterfaceDriver",  |
|                     |      "ex_gw_ports": 1                                                         |
|                     | }                                                                             |
| created_at          | 2014-05-20 23:16:53                                                           |
| description         |                                                                               |
| heartbeat_timestamp | 2014-07-08 02:25:49                                                           |
| host                | novo                                                                          |
| id                  | 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b                                          |
| started_at          | 2014-07-08 01:03:19                                                           |
| topic               | l3_agent                                                                      |
+---------------------+-------------------------------------------------------------------------------+


[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+

[openstack@novo ~(keystone_admin)]$ neutron agent-show ba532785-66f2-467c-acd9-40e9e806e8f8
+---------------------+-----------------------------------------------------------------+
| Field               | Value                                                           |
+---------------------+-----------------------------------------------------------------+
| admin_state_up      | True                                                            |
| agent_type          | Metadata agent                                                  |
| alive               | True                                                            |
| binary              | neutron-metadata-agent                                          |
| configurations      | {                                                               |
|                     |      "nova_metadata_ip": "192.168.1.188",                       |
|                     |      "nova_metadata_port": 8775,                                |
|                     |      "metadata_proxy_socket": "/var/lib/neutron/metadata_proxy" |
|                     | }                                                               |
| created_at          | 2014-05-20 23:16:53                                             |
| description         |                                                                 |
| heartbeat_timestamp | 2014-07-08 02:27:22                                             |
| host                | novo                                                            |
| id                  | ba532785-66f2-467c-acd9-40e9e806e8f8                            |
| started_at          | 2014-07-08 01:03:19                                             |
| topic               | N/A                                                             |
+---------------------+-----------------------------------------------------------------+

To find out network of the current tenant 

[openstack@novo ~(keystone_admin)]$ neutron net-list
+--------------------------------------+---------+------------------------------------------------------+
| id                                   | name    | subnets                                              |
+--------------------------------------+---------+------------------------------------------------------+
| b66854a0-0bc0-4415-a8f3-7d70e2a40dba | private | 4de1afb9-ed1f-4c32-9bbb-20eec6073963 10.0.0.0/24     |
| e505e7e3-b2db-48f3-9967-9c3aa2b01e07 | public  | 96a64200-a1fb-40e8-b888-c16bbe70609a 172.24.4.224/28 |
+--------------------------------------+---------+------------------------------------------------------+

To check the DHCP agent of both networks

[openstack@novo ~(keystone_admin)]$ neutron dhcp-agent-list-hosting-net e505e7e3-b2db-48f3-9967-9c3aa2b01e07
+--------------------------------------+------+----------------+-------+
| id                                   | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | novo | True           | :-)   |
+--------------------------------------+------+----------------+-------+

[openstack@novo ~(keystone_admin)]$ neutron dhcp-agent-list-hosting-net b66854a0-0bc0-4415-a8f3-7d70e2a40dba
+--------------------------------------+------+----------------+-------+
| id                                   | host | admin_state_up | alive |
+--------------------------------------+------+----------------+-------+
| 3b256809-483d-4c0c-b6ad-b4a05bafa72d | novo | True           | :-)   |
+--------------------------------------+------+----------------+-------+

Both above output shows the same ID of DHCP agent

[openstack@novo ~(keystone_admin)]$ neutron agent-list
+--------------------------------------+--------------------+------+-------+----------------+
| id                                   | agent_type         | host | alive | admin_state_up |
+--------------------------------------+--------------------+------+-------+----------------+
3b256809-483d-4c0c-b6ad-b4a05bafa72d | DHCP agent         | novo | :-)   | True           |
| 3c73594b-b16c-41ba-bd43-7ce67dc69a82 | Open vSwitch agent | novo | :-)   | True           |
| 57f0ccf6-d7cd-4428-bbd7-7fb41176fd4b | L3 agent           | novo | :-)   | True           |
| ba532785-66f2-467c-acd9-40e9e806e8f8 | Metadata agent     | novo | :-)   | True           |
+--------------------------------------+--------------------+------+-------+----------------+


OpenStack : Nova : Services and Log files

To check the Nova services :

[openstack@novo ~(keystone_admin)]$ nova service-list
+------------------+------+----------+---------+-------+----------------------------+-----------------+
| Binary           | Host | Zone     | Status  | State | Updated_at                 | Disabled Reason |
+------------------+------+----------+---------+-------+----------------------------+-----------------+
| nova-consoleauth | novo | internal | enabled | up    | 2014-07-08T00:35:30.000000 | -               |
| nova-conductor   | novo | internal | enabled | up    | 2014-07-08T00:35:30.000000 | -               |
| nova-scheduler   | novo | internal | enabled | up    | 2014-07-08T00:35:31.000000 | -               |
| nova-compute     | novo | nova     | enabled | up    | 2014-07-08T00:35:33.000000 | -               |
| nova-cert        | novo | internal | enabled | up    | 2014-07-08T00:35:30.000000 | -               |
+------------------+------+----------+---------+-------+----------------------------+-----------------+

The location of the log files can be found under /var/log/nova

[openstack@novo ~(keystone_admin)]$ ps -ef | grep nova-cert
nova      4764     1  0 18:23 ?        00:00:03 /usr/bin/python /usr/bin/nova-cert --logfile /var/log/nova/cert.log
501      30186  7857  0 20:36 pts/0    00:00:00 grep nova-cert

[openstack@novo ~(keystone_admin)]$ ps -ef | grep nova-compute
nova      4772     1  0 18:23 ?        00:00:22 /usr/bin/python /usr/bin/nova-compute --logfile /var/log/nova/compute.log
501      30209  7857  0 20:36 pts/0    00:00:00 grep nova-compute

[openstack@novo ~(keystone_admin)]$ ps -ef | grep nova-scheduler
nova      4804     1  0 18:23 ?        00:00:03 /usr/bin/python /usr/bin/nova-scheduler --logfile /var/log/nova/scheduler.log
501      30344  7857  0 20:37 pts/0    00:00:00 grep nova-scheduler

There are 9 nova-conductor services up and running.

[openstack@novo ~(keystone_admin)]$ ps -ef | grep nova-conductor
nova      4780     1  1 18:23 ?        00:01:22 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5039  4780  0 18:23 ?        00:00:05 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5040  4780  0 18:23 ?        00:00:04 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5041  4780  0 18:23 ?        00:00:05 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5042  4780  0 18:23 ?        00:00:04 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5043  4780  0 18:23 ?        00:00:05 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5044  4780  0 18:23 ?        00:00:05 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5045  4780  0 18:23 ?        00:00:05 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
nova      5046  4780  0 18:23 ?        00:00:04 /usr/bin/python /usr/bin/nova-conductor --logfile /var/log/nova/conductor.log
501      30369  7857  0 20:37 pts/0    00:00:00 grep nova-conductor

[openstack@novo ~(keystone_admin)]$ ps -ef | grep nova-consoleauth
nova      4788     1  0 18:23 ?        00:00:03 /usr/bin/python /usr/bin/nova-consoleauth --logfile /var/log/nova/consoleauth.log
501      30407  7857  0 20:37 pts/0    00:00:00 grep nova-consoleauth



Tuesday, July 1, 2014

Chef Fundamentals Webinar Series Module 1 - Overview of Chef


https://www.youtube.com/watch?v=yh9osPQA_-k



Slides are here


OpenStack : Horizon, Neutron update for Juno release


https://www.youtube.com/watch?v=gckm0oFXq7o



Horizon :
  • integrate Sahara dashboard
  • finalize RBAC (role-based access control) implementation (we only have user role and admin role right now)
Neutron:  https://wiki.openstack.org/wiki/NeutronJunoProjectPlan

Distributed Virtual Router (DVR)

  • Implements L3 routing across compute nodes 
  • Implements floating IP namespaces per compute node
  • SNAT remains centralized on a service node


Dashboard Horizon Juno slide

Networking Neutron Juno slide

Install Docker on CentOS 6

Please also refer here

We are going to install Docker from EPEL repository.

Check if the EPEL repository is there :

# rpm -qa | grep epel
epel-release-6-8.noarch


I do have epel on my server. If not, you need to install it.
Now continue to install docker-io

$ sudo yum install docker-io
[sudo] password for lo:
Loaded plugins: fastestmirror, priorities, refresh-packagekit, security
Loading mirror speeds from cached hostfile
 * base: mirror.cs.vt.edu
 * epel: epel.mirror.constant.com
 * extras: mirror.anl.gov
 * updates: mirrors-pa.sioru.com
222 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package docker-io.x86_64 0:1.0.0-3.el6 will be installed
--> Processing Dependency: lxc for package: docker-io-1.0.0-3.el6.x86_64
--> Running transaction check
---> Package lxc.x86_64 0:0.9.0-2.el6 will be installed
--> Processing Dependency: liblxc.so.0()(64bit) for package: lxc-0.9.0-2.el6.x86_64
--> Running transaction check
---> Package lxc-libs.x86_64 0:0.9.0-2.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================
 Package                     Arch                     Version                          Repository              Size
====================================================================================================================
Installing:
 docker-io                   x86_64                   1.0.0-3.el6                      epel                   4.5 M
Installing for dependencies:
 lxc                         x86_64                   0.9.0-2.el6                      epel                    78 k
 lxc-libs                    x86_64                   0.9.0-2.el6                      epel                   116 k

Transaction Summary
====================================================================================================================
Install       3 Package(s)

Total download size: 4.7 M
Installed size: 24 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): docker-io-1.0.0-3.el6.x86_64.rpm                                                      | 4.5 MB     00:03    
(2/3): lxc-0.9.0-2.el6.x86_64.rpm                                                            |  78 kB     00:00    
(3/3): lxc-libs-0.9.0-2.el6.x86_64.rpm                                                       | 116 kB     00:00    
--------------------------------------------------------------------------------------------------------------------
Total                                                                               1.4 MB/s | 4.7 MB     00:03    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : lxc-libs-0.9.0-2.el6.x86_64                                                                      1/3
  Installing : lxc-0.9.0-2.el6.x86_64                                                                           2/3
  Installing : docker-io-1.0.0-3.el6.x86_64                                                                     3/3
  Verifying  : docker-io-1.0.0-3.el6.x86_64                                                                     1/3
  Verifying  : lxc-libs-0.9.0-2.el6.x86_64                                                                      2/3
  Verifying  : lxc-0.9.0-2.el6.x86_64                                                                           3/3

Installed:
  docker-io.x86_64 0:1.0.0-3.el6                                                                                   

Dependency Installed:
  lxc.x86_64 0:0.9.0-2.el6                               lxc-libs.x86_64 0:0.9.0-2.el6                             

Complete!


Now it is install. We need to start the Docker daemon.

$ sudo service docker start
Starting docker:                                       [  OK  ]


If we want Docker to start at boot, we need to run this :

$ sudo chkconfig docker on

Now we try test Docker and get the CentOS image

$ sudo docker pull centos:latest
Pulling repository centos
0c752394b855: Download complete
511136ea3c5a: Download complete
34e94e67e63a: Download complete


We make sure we can see the image :

$ sudo docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             VIRTUAL SIZE
centos              latest              0c752394b855        3 weeks ago         124.1 MB


Now try run bash using this centos image

$ sudo docker run -i -t centos /bin/bash
bash-4.1# ps
  PID TTY          TIME CMD
    1 ?        00:00:00 bash
    6 ?        00:00:00 ps


bash-4.1# df
Filesystem           1K-blocks     Used Available Use% Mounted on
rootfs                10321208   300108   9496812   4% /
/dev/mapper/docker-253:0-1179712-6d24d5cf87a18d748db4bc41f1d591f1fa10aebb0e8f3503be0270d9a557d009
                      10321208   300108   9496812   4% /
tmpfs                  3984768        0   3984768   0% /dev
shm                      65536        0     65536   0% /dev/shm
/dev/mapper/vg_novo-lv_root
                     407481848 84566084 302216836  22% /.dockerinit
/dev/mapper/vg_novo-lv_root
                     407481848 84566084 302216836  22% /etc/resolv.conf
/dev/mapper/vg_novo-lv_root
                     407481848 84566084 302216836  22% /etc/hostname
/dev/mapper/vg_novo-lv_root
                     407481848 84566084 302216836  22% /etc/hosts
tmpfs                  3984768        0   3984768   0% /proc/kcore
bash-4.1# pwd
/
bash-4.1# ls
bin  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  sbin    selinux  srv  sys  tmp    usr  var

Outside of this docker container, we can check what is running :

# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
6d24d5cf87a1        centos:latest       /bin/bash           3 minutes ago       Up 3 minutes                            ecstatic_pare