Actions
Bug #12183
closedpaddles /nodes/?locked=false fails with sqlite3
% Done:
0%
Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):
Description
- curl --silent http://paddles.front.sepia.ceph.com/nodes/?locked=False returns unlocked nodes as expected
After setting up paddles with sqlite from sources and populating it with nodes:
- curl --silent http://localhost:8080/nodes/?locked=False always returns []
- curl --silent http://localhost:8080/nodes/?locked=0 returns the list of nodes that are not locked
Updated by Loïc Dachary almost 9 years ago
after pecan populate config.py
sqlite> .schema nodes CREATE TABLE nodes ( id INTEGER NOT NULL, name VARCHAR(256) NOT NULL, description TEXT, up BOOLEAN, machine_type VARCHAR(32), arch VARCHAR(16), is_vm BOOLEAN NOT NULL, os_type VARCHAR(32), os_version VARCHAR(16), vm_host_id INTEGER, locked BOOLEAN NOT NULL, locked_by VARCHAR(64), locked_since DATETIME, mac_address VARCHAR(17), ssh_pub_key TEXT, PRIMARY KEY (id), CHECK (up IN (0, 1)), CHECK (is_vm IN (0, 1)), FOREIGN KEY(vm_host_id) REFERENCES nodes (id), CHECK (locked IN (0, 1)) ); CREATE INDEX ix_nodes_os_version ON nodes (os_version); CREATE INDEX ix_nodes_locked ON nodes (locked); CREATE UNIQUE INDEX ix_nodes_name ON nodes (name); CREATE INDEX ix_nodes_up ON nodes (up); CREATE INDEX ix_nodes_machine_type ON nodes (machine_type); CREATE INDEX ix_nodes_locked_by ON nodes (locked_by);
Updated by Loïc Dachary almost 9 years ago
- Status changed from 12 to Rejected
When using locked=0 instead of locked=False and locked=1 instead of locked=True it works the same for both endpoints (sqlite and sepia, presumably mysql).
Actions