This commit add recover option for rflash command to upload
bmc image with tftp when the BMC is in Brick Protection state.
Example:
```
rflash <node> --recover <image>
```
implement #3873
a2idx: Turns an ASCII character into an index (a=1, b=2, etc)
a2zidx: Turns an ASCII character into a 0-index (a=0, b=1, etc)
dim2idx: Turns dimensions (eg row, column, rack-unit) into an index
skip: Return an index where some items are 'skipped'
ipadd: Add a value to an IP address
This patch add trace log for the db access. Currently support
5 log levels:
- 0: disable the trace log for db.
- 1: trace the calls of database subroutines.
- 2: trace the event to build the cache for the table
- 3: trace the event with cache hit
- 4: trace the SQL statement
implement-feature: #3612
Output example from xcat/cluster.log:
···
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::setAttribs"},"type":"end","elapsed":"0.00176s"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::setAttribs"},"type":"start"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"SELECT * FROM site WHERE \"value\" = ? AND \"comments\" = ? AND \"disable\" = ? AND \"key\" = ?","table":"site","method":"xCAT::Table::setAttribs"},"type":"start_sql"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::setAttribs"},"type":"end_sql","elapsed":"0.00043s"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"INSERT INTO site (\"value\",\"comments\",\"key\",\"disable\") VALUES (?,?,?,?)","table":"site","method":"xCAT::Table::setAttribs"},"type":"start_sql"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"INSERT INTO site (\"value\",\"comments\",\"key\",\"disable\") VALUES (?,?,?,?)","table":"site","method":"xCAT::Table::setAttribs"},"type":"end_sql","elapsed":"0.00043s"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::setAttribs"},"type":"end","elapsed":"0.00171s"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::getAttribs"},"type":"start"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"SELECT * FROM site WHERE \"key\" = ? and (\"disable\" is NULL or \"disable\" in ('0','no','NO','No','nO'))","table":"site","method":"xCAT::Table::getAttribs"},"type":"start_sql"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::getAttribs"},"type":"end_sql","elapsed":"0.00061s"}
Aug 9 01:59:15 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::getAttribs"},"type":"end","elapsed":"0.00125s"}
Aug 9 01:59:19 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"table":"site","method":"xCAT::Table::getAllAttribs"},"type":"start"}
Aug 9 01:59:19 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"SELECT * FROM site WHERE \"disable\" is NULL or \"disable\" in ('0','no','NO','No','nO')","table":"site","method":"xCAT::Table::getAllAttribs"},"type":"start_sql"}
Aug 9 01:59:19 c910f05c01bc02k74 xcat[694]: [DB Trace]: {"msg":{"addon":"SELECT * FROM site WHERE \"disable\" is NULL or \"disable\" in ('0','no','NO','No','nO')","table":"site","method":"xCAT::Table::getAllAttribs"},"type":"end_sql","elapsed":"0.00080s"}
···
* xCAT-client: allow pgsqlsetup(1) to accept additional pg_hba.conf entries
Currently pgsqlsetup(1) only sets up the MN ip address for access via
pg_hba.conf. This change adds a -a flag to allow the user to specify
additional addresses for use in that file.
This is useful for users who already know what IP addresses will be
used by their service nodes, so they can pass them directly to the
pgsqlsetup program, without needing to edit pg_hba.conf (and avoiding
needing to restart postgresql and xcat after the edit).
* xCAT-client: fix formatting in pgsqlsetup(1)
* pgsqlsetup.1.pod: clarify default setup
* pgsqlsetup.1.pod: update usage section to reflect access flag
* pgsqlsetup.1: refresh documentation
* xCAT-client/bin/pgsqlsetup: add -a/--access to usage statement
2, handle 'disjoint' in preprocess method, to make sure that no request will be sent to SN which does not manage the nodes.
3, refine 'stat' to make sure it could query unmanaged nodes on-demand.
This patch redesign the original getadapter plugins. Currently,
getadapter do not work as a common command but only a chain command
works during discovery.