Ceph, Rados GW

Ceph: Running radosgw services

Here I will discuss, how to start and stop the radosgw services, on where the radosgw packages installed.

To starting the radosgw by the using the below command:

#systemctl status  ceph-radosgw@rgw.ceph-001.service
ceph-radosgw@rgw.ceph-001.service - Ceph rados gateway
Loaded: loaded (/lib/systemd/system/ceph-radosgw@.service; enabled; vendor pr
   Active: active (running) since Mon 2017-05-05 17:28:13 IST; 1 weeks 2 days ag
Main PID: 20739 (radosgw)
   CGroup: /system.slice/system-ceph\x2dradosgw.slice/ceph-radosgw@rgw.ceph-001.
         └─20739 /usr/bin/radosgw -f --cluster ceph --name client.rgw.ceph-001

#systemctl stop  ceph-radosgw@rgw.ceph-001.service
ceph-radosgw@rgw.ceph-001.service - Ceph rados gateway 
Loaded: loaded (/lib/systemd/system/ceph-radosgw@.service; enabled; vendor pr 
   Active: inactive (dead) since Wed 2017-05-14 21:37:40 IST; 3s ago
 Process: 20739 ExecStart=/usr/bin/radosgw -f --cluster ${CLUSTER} --name clien
Main PID: 20739 (code=exited, status=0/SUCCESS)
May 14 21:37:40 ceph-005 systemd[1]: Stopping Ceph rados gateway...
May 14 21:37:40 ceph-005 radosgw[20739]: 2017-05-14 21:37:40.233133 7fe1bfc0ca00
May 14 21:37:40 ceph-005 systemd[1]: Stopped Ceph rados gateway.

#systemctl start  ceph-radosgw@rgw.ceph-001.service
#systemctl status  ceph-radosgw@rgw.ceph-001.service
ceph-radosgw@rgw.ceph-005.service - Ceph rados gateway  
Loaded: loaded (/lib/systemd/system/ceph-radosgw@.service; enabled; vendor pr
   Active: active (running) since Wed 2017-05-14 21:37:48 IST; 2s ago
Main PID: 751 (radosgw)
   CGroup: /system.slice/system-ceph\x2dradosgw.slice/ceph-radosgw@rgw.ceph-001.
           └─751 /usr/bin/radosgw -f --cluster ceph --name client.rgw.ceph-001 

Alternatively, you can use below commands also:

 service ceph-radosgw@rgw.ceph-001 start/stop/status

 

 

 

Advertisements
Ceph, Openstack, Rados GW, Telemetry

Ceph RGW usage with Openstack Telemetry

We assume that the  Ceph RGW (i.e Rados Gate Way) and Openstack Keystone are already integrated and working. If not you can use the Ceph documentation here.
You can make sure everything works properly with

# source openrc // with admin tenant
# swift -V 2.0 -A http://localhost:5000/v2.0  stat
             Account: v1
           Containers: 1
              Objects: 174
                 Bytes: 26824860
X-Account-Bytes-Used-Actual: 27140096
             X-Trans-Id: tx00000000000000000000d-0056b23cdc-19cf4-default
           Content-Type: text/plain; charset=utf-8
          Accept-Ranges: bytes

Make sure usage logs are enabled on the radosgw by setting rgw_enable_usage_log = true. You will also need a RadosGW admin user. I created the same  as follows:

# radosgw-admin user create --uid admin --display-name "admin user" --caps "usage=read,write;metadata=read,write;users=read,write;buckets=read,write"

In /etc/ceilometer/ceilometer.conf, uncomment and configure the following

radosgw = object-store
[rgw_admin_credentials]
access_key = <admin user access_key>
secret_key = <admin user secret>

The rgw ceilometer module depends on requests-aws to access the Admin ops API. Install it and restart the ceilometer service

# pip install requests-aws
# openstack-service restart ceilometer

After a while, the meters should show up

(keystone_admin)# ceilometer meter-list
+---------------------------------+-------+---------+---------------------------------------------+---------+----------------------------------+
| Name                            | Type  | Unit    | Resource ID                                 | User ID | Project ID                       |
+---------------------------------+-------+---------+---------------------------------------------+---------+----------------------------------+
| image                           | gauge | image   | d230f54e-6877-451e-bd6c-ca1c460b9041        | None    | ff4d8e6c7e244acb82476fb6acba1833 |
| image.size                      | gauge | B       | d230f54e-6877-451e-bd6c-ca1c460b9041        | None    | ff4d8e6c7e244acb82476fb6acba1833 |
| radosgw.api.request             | gauge | request | 4ddbab4fb6b445fb8195dd08b9cc05a9            | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.api.request             | gauge | request | 8ce73b1b38ab4945b294d691dfd86101            | None    | 8ce73b1b38ab4945b294d691dfd86101 |
| radosgw.api.request             | gauge | request | ff4d8e6c7e244acb82476fb6acba1833            | None    | ff4d8e6c7e244acb82476fb6acba1833 |
| radosgw.containers.objects      | gauge | object  | 4ddbab4fb6b445fb8195dd08b9cc05a9/container1 | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.containers.objects.size | gauge | B       | 4ddbab4fb6b445fb8195dd08b9cc05a9/container1 | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.objects                 | gauge | object  | 4ddbab4fb6b445fb8195dd08b9cc05a9            | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.objects                 | gauge | object  | 8ce73b1b38ab4945b294d691dfd86101            | None    | 8ce73b1b38ab4945b294d691dfd86101 |
| radosgw.objects                 | gauge | object  | ff4d8e6c7e244acb82476fb6acba1833            | None    | ff4d8e6c7e244acb82476fb6acba1833 |
| radosgw.objects.containers      | gauge | object  | 4ddbab4fb6b445fb8195dd08b9cc05a9            | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.objects.containers      | gauge | object  | 8ce73b1b38ab4945b294d691dfd86101            | None    | 8ce73b1b38ab4945b294d691dfd86101 |
| radosgw.objects.containers      | gauge | object  | ff4d8e6c7e244acb82476fb6acba1833            | None    | ff4d8e6c7e244acb82476fb6acba1833 |
| radosgw.objects.size            | gauge | B       | 4ddbab4fb6b445fb8195dd08b9cc05a9            | None    | 4ddbab4fb6b445fb8195dd08b9cc05a9 |
| radosgw.objects.size            | gauge | B       | 8ce73b1b38ab4945b294d691dfd86101            | None    | 8ce73b1b38ab4945b294d691dfd86101 |
| radosgw.objects.size            | gauge | B       | ff4d8e6c7e244acb82476fb6acba1833            | None    | ff4d8e6c7e244acb82476fb6acba1833 |
+---------------------------------+-------+---------+---------------------------------------------+---------+----------------------------------+

Get the samples for the radosgw.objects meters on tenant ID 4ddbab4fb6b445fb8195dd08b9cc05a9 (admin)

(keystone_admin)# ceilometer sample-list -q resource_id=4ddbab4fb6b445fb8195dd08b9cc05a9 -m radosgw.objects
+----------------------------------+-----------------+-------+--------+--------+----------------------------+
| Resource ID                      | Name            | Type  | Volume | Unit   | Timestamp                  |
+----------------------------------+-----------------+-------+--------+--------+----------------------------+
| 4ddbab4fb6b445fb8195dd08b9cc05a9 | radosgw.objects | gauge | 87.0   | object | 2016-02-03T17:21:50.201000 |
| 4ddbab4fb6b445fb8195dd08b9cc05a9 | radosgw.objects | gauge | 0.0    | object | 2016-02-03T16:39:15.050000 |
+----------------------------------+-----------------+-------+--------+--------+----------------------------+