Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Cinder volume is not attaching with error "iscsiadm: No session found"

Hai,

I tried to attach volume to my instance test1 as below

              # nova volume-attach test1 4b2f4ac6-3994-4163-a896-ecb009f6628a                  +----------+--------------------------------------+                                            | Property | Value                                                                             +----------+--------------------------------------+                                            | device   | /dev/vdb                             |                                            | id       | 4b2f4ac6-3994-4163-a896-ecb009f6628a |                                            | serverId | 3bde7c56-f845-4fb2-b190-a068202cc2c9 |                                            | volumeId | 4b2f4ac6-3994-4163-a896-ecb009f6628a |                                            +----------+--------------------------------------+ 


# nova volume-list                                                                             +--------------------------------------+-----------+--------------+------+-------------+-------------+                                                                                        | ID                                   | Status    | Display Name | Size | Volume Type | Attached to |                                                                                        +--------------------------------------+-----------+--------------+------+-------------+-------------+                                                                                        | 4b2f4ac6-3994-4163-a896-ecb009f6628a | attaching | test1        | 1    | None        |             |                                                                                        +--------------------------------------+-----------+--------------+------+-------------+-------------+

As seen above it is showing attaching for long time and nothing is happening. After sometime it will again show as available without anything attached to the instance. In my /var/log/nova/nova-compute.log iam getting an error like this.

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] ProcessExecutionError: Unexpected error while running command.



  2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2010-10.org.openstack:volume-4b2f4ac6-3994-4163-a896-ecb009f6628a -p 172.30.210.190:3260 --rescan

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Exit code: 21

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stdout: u''

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stderr: u'iscsiadm: No session found.\n'

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9]

2016-11-08 13:23:28.909 49554 DEBUG nova.volume.cinder [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] Cinderclient connection created using URL: http://os_cinder:8776/v1/15fa6e1ce28d446fabf8dba757802093 get_cinder_client_version /usr/lib/python2.7/dist-packages/nova/volume/cinder.py:255

2016-11-08 13:23:29.990 49554 ERROR nova.compute.manager [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Failed to attach 4b2f4ac6-3994-4163-a896-ecb009f6628a at /dev/vdb

Iam also getting an error in my /var/log/cinder/cinder-api.log iam also getting an error like this.

2016-11-08 14:54:45.263 22416 TRACE cinder Traceback (most recent call last):
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/bin/cinder-api", line 60, in <module>
2016-11-08 14:54:45.263 22416 TRACE cinder     server = service.WSGIService('osapi_volume')
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 345, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     port=self.port)
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/wsgi.py", line 186, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     {'host': host, 'port': port})
2016-11-08 14:54:45.263 22416 TRACE cinder RuntimeError: Could not bind to 0.0.0.0:8776 after trying for 30 seconds

I dont know whether it is caused by the cinder-api error or something else. The strange thing is everything was working fine couple of weeks ago. I can create volume and attach it to the instances. But now I can only create volumes but attaching to instance is not working. Any help regarding this is highly appreciated.

Cinder volume is not attaching with error "iscsiadm: No session found"

Hai,

I tried to attach volume to my instance test1 as below

 # nova volume-attach test1 4b2f4ac6-3994-4163-a896-ecb009f6628a
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | /dev/vdb                             |
| id       | 4b2f4ac6-3994-4163-a896-ecb009f6628a                  +----------+--------------------------------------+                                            | Property | Value                                                                             +----------+--------------------------------------+                                            | device   | /dev/vdb                             |                                            | id       |
| serverId | 3bde7c56-f845-4fb2-b190-a068202cc2c9 |
| volumeId | 4b2f4ac6-3994-4163-a896-ecb009f6628a |                                            | serverId | 3bde7c56-f845-4fb2-b190-a068202cc2c9 |                                            | volumeId | 4b2f4ac6-3994-4163-a896-ecb009f6628a |                                            +----------+--------------------------------------+ 

|
+----------+--------------------------------------+

# nova volume-list                                                                             +--------------------------------------+-----------+--------------+------+-------------+-------------+                                                                                        volume-list
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to |                                                                                        +--------------------------------------+-----------+--------------+------+-------------+-------------+                                                                                        |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| 4b2f4ac6-3994-4163-a896-ecb009f6628a | attaching | test1        | 1    | None        |             |                                                                                        |
| be8a6279-a9f7-4090-9b5f-976685101356 | available | ptpt-gfs1    | 500  | None        |             |
| 2d77d29c-4e6e-400a-8909-370fac9378ed | available | ptpt-gfs0    | 500  | None        |             |
| 12ce8734-d718-4d1a-a1fc-b841a9155c5c | available | ptpt_hdfs2   | 500  | None        |             |
| d402e3ef-eea5-4cb6-b368-3cc8a8f30813 | available | test-volume1 | 15   | None        |             |
| 375e7768-a91c-45fe-ae9a-94eac8f7003e | available | ptpt_hdfs1   | 500  | None        |             |
+--------------------------------------+-----------+--------------+------+-------------+-------------+

As seen above it is showing attaching for long time and nothing is happening. After sometime it will again show as available without anything attached to the instance. In my /var/log/nova/nova-compute.log iam getting an error like this.

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] ProcessExecutionError: Unexpected error while running command.



  2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2010-10.org.openstack:volume-4b2f4ac6-3994-4163-a896-ecb009f6628a -p 172.30.210.190:3260 --rescan

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Exit code: 21

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stdout: u''

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stderr: u'iscsiadm: No session found.\n'

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9]

2016-11-08 13:23:28.909 49554 DEBUG nova.volume.cinder [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] Cinderclient connection created using URL: http://os_cinder:8776/v1/15fa6e1ce28d446fabf8dba757802093 get_cinder_client_version /usr/lib/python2.7/dist-packages/nova/volume/cinder.py:255

2016-11-08 13:23:29.990 49554 ERROR nova.compute.manager [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Failed to attach 4b2f4ac6-3994-4163-a896-ecb009f6628a at /dev/vdb

Iam also getting an error in my /var/log/cinder/cinder-api.log iam also getting an error like this.

2016-11-08 14:54:45.263 22416 TRACE cinder Traceback (most recent call last):
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/bin/cinder-api", line 60, in <module>
2016-11-08 14:54:45.263 22416 TRACE cinder     server = service.WSGIService('osapi_volume')
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 345, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     port=self.port)
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/wsgi.py", line 186, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     {'host': host, 'port': port})
2016-11-08 14:54:45.263 22416 TRACE cinder RuntimeError: Could not bind to 0.0.0.0:8776 after trying for 30 seconds

I dont know whether it is caused by the cinder-api error or something else. The strange thing is everything was working fine couple of weeks ago. I can create volume and attach it to the instances. But now I can only create volumes but attaching to instance is not working. Any help regarding this is highly appreciated.

Cinder volume is not attaching with error "iscsiadm: No session found"

Hai,

I tried to attach volume to my instance test1 as below

# nova volume-attach test1 4b2f4ac6-3994-4163-a896-ecb009f6628a
+----------+--------------------------------------+
| Property | Value                                |
+----------+--------------------------------------+
| device   | /dev/vdb                             |
| id       | 4b2f4ac6-3994-4163-a896-ecb009f6628a |
| serverId | 3bde7c56-f845-4fb2-b190-a068202cc2c9 |
| volumeId | 4b2f4ac6-3994-4163-a896-ecb009f6628a |
+----------+--------------------------------------+

# nova volume-list
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| ID                                   | Status    | Display Name | Size | Volume Type | Attached to |
+--------------------------------------+-----------+--------------+------+-------------+-------------+
| 4b2f4ac6-3994-4163-a896-ecb009f6628a | attaching | test1        | 1    | None        |             |
| be8a6279-a9f7-4090-9b5f-976685101356 d402e3ef-eea5-4cb6-b368-3cc8a8f30813 | available | ptpt-gfs1    | 500 test-volume1 | 15   | None        |             |
| 2d77d29c-4e6e-400a-8909-370fac9378ed | available | ptpt-gfs0    | 500  | None        |             |
| 12ce8734-d718-4d1a-a1fc-b841a9155c5c | available | ptpt_hdfs2   | 500  | None        |             |
| d402e3ef-eea5-4cb6-b368-3cc8a8f30813 | available | test-volume1 | 15   | None        |             |
| 375e7768-a91c-45fe-ae9a-94eac8f7003e | available | ptpt_hdfs1   | 500  | None        |             |
 +--------------------------------------+-----------+--------------+------+-------------+-------------+

As seen above it is showing attaching for long time and nothing is happening. After sometime it will again show as available without anything attached to the instance. In my /var/log/nova/nova-compute.log iam getting an error like this.

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] ProcessExecutionError: Unexpected error while running command.



  2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Command: sudo nova-rootwrap /etc/nova/rootwrap.conf iscsiadm -m node -T iqn.2010-10.org.openstack:volume-4b2f4ac6-3994-4163-a896-ecb009f6628a -p 172.30.210.190:3260 --rescan

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Exit code: 21

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stdout: u''

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Stderr: u'iscsiadm: No session found.\n'

2016-11-08 13:23:28.906 49554 TRACE nova.virt.block_device [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9]

2016-11-08 13:23:28.909 49554 DEBUG nova.volume.cinder [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] Cinderclient connection created using URL: http://os_cinder:8776/v1/15fa6e1ce28d446fabf8dba757802093 get_cinder_client_version /usr/lib/python2.7/dist-packages/nova/volume/cinder.py:255

2016-11-08 13:23:29.990 49554 ERROR nova.compute.manager [req-164d070f-466b-4422-84a2-3ecbb007ad33 None] [instance: 3bde7c56-f845-4fb2-b190-a068202cc2c9] Failed to attach 4b2f4ac6-3994-4163-a896-ecb009f6628a at /dev/vdb

Iam also getting an error in my /var/log/cinder/cinder-api.log iam also getting an error like this.

2016-11-08 14:54:45.263 22416 TRACE cinder Traceback (most recent call last):
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/bin/cinder-api", line 60, in <module>
2016-11-08 14:54:45.263 22416 TRACE cinder     server = service.WSGIService('osapi_volume')
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/service.py", line 345, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     port=self.port)
2016-11-08 14:54:45.263 22416 TRACE cinder   File "/usr/lib/python2.7/dist-packages/cinder/wsgi.py", line 186, in __init__
2016-11-08 14:54:45.263 22416 TRACE cinder     {'host': host, 'port': port})
2016-11-08 14:54:45.263 22416 TRACE cinder RuntimeError: Could not bind to 0.0.0.0:8776 after trying for 30 seconds

I dont know whether it is caused by the cinder-api error or something else. The strange thing is everything was working fine couple of weeks ago. I can create volume and attach it to the instances. But now I can only create volumes but attaching to instance is not working. Any help regarding this is highly appreciated.