intel / intelRSD

Intel® Rack Scale Design Reference Software
http://intel.com/IntelRSD
101 stars 55 forks source link

Questions how PSME compute agent send IPMI commands to BMC AST2400 2500 and remove CY7C65215 #48

Closed housemic closed 6 years ago

housemic commented 6 years ago

Dear intel - the questions are related to these issues No. -

Q1 - Currently I have no the hardware USB-Serial Bridge Controller CY7C65215 - Cypress Semiconductor, and I setup 2 PSME servers that have BMC - ASPEED AST2400 / AST2500 chip, if PSME compute agent want to send IPMI commands (ex: get Device ID) to BMC - AST2400 / AST2500, because currently BMC (AST2400 / AST2500) don't support PSME REST API, I think that PSME compute agent use IPMI commands to communicate with BMC, Could you have suggestions ? Does it only modify configuration (.hpp) ? or need to modify a lot of code (.hpp, *.cpp) ? thanks.

Q2 - The PSME Compute Agent requires communication with the Cypress USB to I2C driver, which is provided by the cyMUX service. if PSME Compute Agent want to remove Cypress USB to I2C driver, Could you have suggestions ? thank you.

House

tbykowsk commented 6 years ago

Hi @housemic,

  1. PSME Compute Agent communicates with BMC via IPMI, it uses a limited set of commands defined in IPMI Specification and in Firmware Extension Specification. They are implemented as generic and sdv commands in the source code. If they are supported by your hardware, then you may not need to reimplement them, but adjust their usage to your platform in PSME Compute Agent.

  2. In PSME Compute Agent cyMUX is handled by IPMB module. I would suggest to modify the source code which references to it.

housemic commented 6 years ago

Dear tbykowsk , please help these questions, thank you - Question 3 - Does BMC need to implement MDR related IPMI commands in Firmware Extension Specification ? Question 4 - If currently my BMC doesn't support MDR related IPMI commands in Firmware Extension Specification, so PSME Compute Agent can not get HW information from BMC, Is it right ? House

tbykowsk commented 6 years ago
  1. The Architecture Specification in Section 2. provides a summary of the Intel RSD Platform design requirements. The MDR related IPMI commands are mainly used for HW discovery (required) and iSCSI OOB Booting (recommended) features. If you want to use PSME Compute Agent v2.2 as is, then your BMC should support them.

  2. You could modify PSME Compute Agent source code not to use the MDR, if your hardware has other means to provide required functionalities.

housemic commented 6 years ago

Dear tbykowsk, Question 5 - I have one PSME server A (IP:192.168.1.105) and another computer B (IP: 192.168.1.87), If I want to modify "PSME compute agent" source code to send a basic IPMI command (ex: get Device ID) from PSME server A to another computer B's BMC, and A's PSME compute agent will get B's BMC response BMC's information, Does it have simple method to implement ? thank you. House

tbykowsk commented 6 years ago

PSME Compute Agent communicates with BMCs defined in the agent configuration. You should set connection parameters in managers:

remaining fields in a manager should be present, but are not relevant for communication.

However, PSME Compute Agent will not establish any connection to BMC until it detects a presence of a sled. Please analyze the source code to see how detection is currently implemented.

housemic commented 6 years ago

Dear tbykowsk , I created an environment of PSME (server and compute agent) and connect to a BMC computer. a HUB , IP is 192.168.1.1, used to connect PSME server and BMC computer. a PSME server, OS is ubuntu, PCIe LAN card IP is 192.168.1.135. a BMC computer, OS is ubuntu, BMC LAN IP is 192.168.1.138.

in the PSME server, I installed ipmitool OK, and send ipmi command to the remote BMC OK. sudo ipmitool -I lanplus -U root -P root -H 192.168.1.138 lan print

in the PSME server, display remote BMC Web UI User interface OK - http://192.168.1.138

in the PSME server, display remote BMC Redfish data OK - https://192.168.1.138/redfish/v1 https://192.168.1.138/redfish/v1/Systems

Question 6 - Are above settings correct for PSME and BMC ? thank you House

next comment will describe my code change.

housemic commented 6 years ago

Dear tbykowsk , I modified settings of "managers" in configuration.json in /intelRSD-2-2/PSME/agent/compute, but have some problems and questions, need your suggestions -


edit configuration.json

"managers": [
    {
        "slot" : 1,
        "switchPortIdentifier" : "sw0p37",
        "ipv4": "192.168.1.138",
        "username": "bmc_user",
        "password": "bmc_pass",
        "port": 623,
        "serialConsoleEnabled": true
    },

make psme-rest-server psme-compute psme-compute-simulator -j8

ls -la bin

total 23440 drwxrwxr-x 4 user user 4096 鈭? 13 22:15 . drwxrwxr-x 16 user user 4096 鈭? 13 22:08 .. drwxrwxr-x 2 user user 4096 鈭? 13 22:08 examples -rwxrwxr-x 1 user user 7507600 鈭? 13 22:15 psme-compute -rwxrwxr-x 1 user user 4018488 鈭? 13 22:15 psme-compute-simulator -rwxrwxr-x 1 user user 12452216 鈭? 13 22:14 psme-rest-server drwxrwxr-x 2 user user 4096 鈭? 13 22:08 tests


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin ./psme-rest-server ../../application/configuration.json


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin ./psme-compute ../../agent/compute/configuration.json


PSME compute agent messages :

user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ ./psme-compute ../../agent/compute/configuration.json 2018-02-13 23:35:21.237996307 - INFO - agent - Method getChassisInfo has been registered 2018-02-13 23:35:21.238335515 - INFO - agent - Method getCollection has been registered 2018-02-13 23:35:21.238383549 - INFO - agent - Method getDriveInfo has been registered 2018-02-13 23:35:21.238414156 - INFO - agent - Method getManagersCollection has been registered 2018-02-13 23:35:21.238442124 - INFO - agent - Method getTasksCollection has been registered 2018-02-13 23:35:21.238471706 - INFO - agent - Method getManagerInfo has been registered 2018-02-13 23:35:21.238505574 - INFO - agent - Method getTaskInfo has been registered 2018-02-13 23:35:21.238533442 - INFO - agent - Method getTaskResultInfo has been registered 2018-02-13 23:35:21.238560992 - INFO - agent - Method getMemoryInfo has been registered 2018-02-13 23:35:21.238594376 - INFO - agent - Method getNetworkInterfaceInfo has been registered 2018-02-13 23:35:21.238673459 - INFO - agent - Method getNetworkDeviceInfo has been registered 2018-02-13 23:35:21.238749782 - INFO - agent - Method getNetworkDeviceFunctionInfo has been registered 2018-02-13 23:35:21.238872171 - INFO - agent - Method getProcessorInfo has been registered 2018-02-13 23:35:21.238955607 - INFO - agent - Method getStorageControllerInfo has been registered 2018-02-13 23:35:21.239038719 - INFO - agent - Method getStorageSubsystemInfo has been registered 2018-02-13 23:35:21.239119509 - INFO - agent - Method getComputerSystemInfo has been registered 2018-02-13 23:35:21.239396124 - INFO - agent - Method setComponentAttributes has been registered 2018-02-13 23:35:21.239468903 - INFO - agent - Method getTrustedModuleInfo has been registered 2018-02-13 23:35:21.239522176 - INFO - agent - Method deleteTask has been registered 2018-02-13 23:35:21.239569774 - INFO - agent - Method getMetricDefinitionInfo has been registered 2018-02-13 23:35:21.239612801 - INFO - agent - Method getMetricDefinitionsCollection has been registered 2018-02-13 23:35:21.239693345 - INFO - agent - Method getMetrics has been registered 2018-02-13 23:35:21.239770389 - INFO - agent - Method getFanInfo has been registered 2018-02-13 23:35:21.239827933 - INFO - agent - Method getPowerZoneInfo has been registered 2018-02-13 23:35:21.239891394 - INFO - agent - Method getThermalZoneInfo has been registered 2018-02-13 23:35:21.246566454 - INFO - compute-agent - MANUAL PSME BUILD; Built 22:07:45, 13-02-2018 2018-02-13 23:35:21.246772996 - DEBUG - configuration - Added file ../../agent/compute/configuration.json 2018-02-13 23:35:21.246975014 - WARN - configuration - Cannot load default file 2018-02-13 23:35:21.247057731 - INFO - configuration - Load file 2018-02-13 23:35:21.247302242 - INFO - configuration - Loaded file ../../agent/compute/configuration.json 2018-02-13 23:35:21.247424153 - INFO - configuration - Load internal defaults 2018-02-13 23:35:21.247693563 - INFO - compute-agent - JSON Schema load! 2018-02-13 23:35:21.251908440 - INFO - compute-agent - Running SDV PSME Compute Agent. 2018-02-13 23:35:21.253645649 - INFO - eventing - Starting EventDispatcher thread... 2018-02-13 23:35:21.253666337 - WARN - db - Cannot check /var/opt/psme/check_dPoVyC:: Permission denied 2018-02-13 23:35:21.253784275 - INFO - db - Database in temporary /tmp/database_Fn7KsO 2018-02-13 23:35:21.253915426 - INFO - default - Service UUID 90586af4-f5c9-11e7-b8b5-1f87effca6f1. 2018-02-13 23:35:21.260425559 - INFO - registration - Agent has been registered to http://localhost:8383, interval 3s, rest runs for 0s 2018-02-13 23:35:21.260444368 - INFO - eventing - Sending AMC notifications enabled. 2018-02-13 23:35:24.267620571 - INFO - agent - gpio minimal read interval: 5000ms 2018-02-13 23:35:24.268785699 - ERROR - default - Unable to send/receive data to/from MUX: Connection refused 2018-02-13 23:35:29.268340649 - ERROR - default - Unable to send/receive data to/from MUX: Connection refused


PSME REST server messages :

user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ ./psme-rest-server ../../application/configuration.json 2018-02-13 23:33:55.742563897 - INFO - agent - Method componentNotification has been registered 2018-02-13 23:33:55.742671196 - INFO - agent - Method attach has been registered 2018-02-13 23:33:55.742707506 - INFO - agent - Method heartBeat has been registered 2018-02-13 23:33:55.748427023 - INFO - app - MANUAL PSME BUILD; Built 22:07:45, 13-02-2018 2018-02-13 23:33:55.748484849 - DEBUG - configuration - Added file ../../application/configuration.json 2018-02-13 23:33:55.748534033 - WARN - configuration - Cannot load default file 2018-02-13 23:33:55.748557013 - INFO - configuration - Load file 2018-02-13 23:33:55.748637762 - INFO - configuration - Loaded file ../../application/configuration.json 2018-02-13 23:33:55.748679355 - INFO - configuration - Load internal defaults 2018-02-13 23:33:55.748882124 - WARN - configuration - No configuration section ::metadata-file provided. Using internal defaults. 2018-02-13 23:33:55.749024138 - INFO - app - JSON Schema load! 2018-02-13 23:33:55.753746302 - WARN - db - Cannot check /var/opt/psme/check_KEB7sT:: Permission denied 2018-02-13 23:33:55.753994536 - INFO - db - Database in temporary /tmp/database_ZkvzwM 2018-02-13 23:33:55.754392847 - INFO - default - Service UUID 54741184-fffe-11e7-ae0f-9368db031585. 2018-02-13 23:33:55.755214242 - INFO - app - Loaded subscriptions: "7" : {"Name":"Event Subscription","Destination":"https://10.3.0.1:8443/rest/EventListener/psme/54741184-fffe-11e7-ae0f-9368db031585","Context":"Subscribed by PodM with UUID: fcec4360-b446-4bf5-94cd-a94207169561","Protocol":"Redfish","EventTypes":["StatusChange","ResourceUpdated","ResourceAdded","ResourceRemoved","Alert"],"OriginResources":[]} 2018-02-13 23:33:55.772790447 - INFO - net - NetworkChangeNotifier started. 2018-02-13 23:33:55.778857511 - INFO - rest - Starting REST event service ... 2018-02-13 23:33:55.778979176 - INFO - rest - REST event service started. 2018-02-13 23:33:55.782709007 - INFO - rest - Starting REST server ... 2018-02-13 23:33:55.782763869 - INFO - rest - Loaded : /etc/psme/certs/server.key 2018-02-13 23:33:55.782804360 - INFO - rest - Loaded : /etc/psme/certs/server.crt 2018-02-13 23:33:55.790569201 - INFO - rest - HTTPS connector started on port: 8443 2018-02-13 23:33:55.790766563 - INFO - rest - HTTP connector started on port: 8888 2018-02-13 23:33:55.790812162 - INFO - rest - REST server started. 2018-02-13 23:33:55.791549460 - INFO - rest - Initially invalidated 0 persistence entries 2018-02-13 23:33:55.792043595 - INFO - ssdp - SSDP active on interfaces: open notification sockets: 2018-02-13 23:33:55.792121415 - INFO - ssdp - SSDP service started. 2018-02-13 23:34:15.793768799 - INFO - rest - Polling started run #1 2018-02-13 23:34:15.793858420 - INFO - rest - Polling completed run #1 [0ms] 2018-02-13 23:34:35.796087809 - INFO - rest - Polling started run #2 2018-02-13 23:34:35.796102900 - INFO - rest - Polling completed run #2 [0ms] 2018-02-13 23:34:55.798239582 - INFO - rest - Polling started run #3 2018-02-13 23:34:55.798252057 - INFO - rest - Polling completed run #3 [0ms] 2018-02-13 23:35:15.800260890 - INFO - rest - Polling started run #4 2018-02-13 23:35:15.800274331 - INFO - rest - Polling completed run #4 [0ms] 2018-02-13 23:35:21.258935631 - INFO - rest - Registration: Request.IP = localhost gamiId = 90586af4-f5c9-11e7-b8b5-1f87effca6f1 port = 7777 capabilities = ["Compute"] 2018-02-13 23:35:21.259002730 - INFO - registration - Agent 90586af4-f5c9-11e7-b8b5-1f87effca6f1 registered. 2018-02-13 23:35:35.802196180 - INFO - rest - Polling started run #5 2018-02-13 23:35:35.802235390 - INFO - rest - [P] Polling started on Root uuid= 2018-02-13 23:35:35.808201883 - INFO - rest - Polling completed run #5 [5ms]

next comment will describ my questions, thank you - House

housemic commented 6 years ago

Dear tbykowsk, Please help these questions, thank you -

Question 7 - after I modified settings of "managers" in configuration.json in /intelRSD-2-2/PSME/agent/compute, Are there any log file about the result is pass or fail that PSME Compute Agent communicates with BMC ?

Question 8 - PSME Compute Agent always display the error message - "Unable to send/receive data to/from MUX: Connection refused", the message comes from GpioManager::send_request_process_response() in Gpio_manager.cpp,

then the called procedures are - GpioManager::send_request_process_response() in Gpio_manager.cpp <-- GpioManager::update_presence() <-- GpioManager::get_presence() <-- GpioManager::is_present() <-- BmcCollection load_bmcs() in Main.cpp <-- int main() in Main.cpp, Is the function call order list right ?

Question 9 - IF I want to remove the error message - "Unable to send/receive data to/from MUX: Connection refused" Could I have simple setting or simple code change to do it ?

Question 10 - for my PSME & BMC environment, Do I only remove cyMUX related code ? Are there any malfunction when I remove cyMUX code ?

thanks House

tbykowsk commented 6 years ago

Your configuration.json looks fine, assuming that you put your working BMC username and password unencrypted just as an example. If not, then you should encrypt and put there the credentials which you used with ipmitool (root:root).

Ad 7. If you change the log level to "DEBUG" in configuration.json, then you should get detailed logs when PSME Compute Agent communicates with BMC. However, the communication will not begin until you resolve the MUX problem.

Ad 8. & 9. The function call order is correct. GpioManager is checking sleds presence using a method which your hardware does not support. A work-around could be to modify this line to always return true, but it is not an elegant solution.

housemic commented 6 years ago

Dear tbykowsk, I use an intel Grantley platform system (Haswell/Broadwell CPU) its BMC LAN network IP is : 192.168.1.190 BMC username / password is : admin / admin


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build

cmake ..


make encrypt -j8

Built target encrypt


sudo touch /etc/psme/psme-key

ls -la /etc/psme total 24 drwxr-xr-x 3 root root 4096 鈭? 21 18:12 . drwxr-xr-x 135 root root 12288 鈭? 12 22:15 .. drwxr-xr-x 2 root root 4096 銝€ 15 17:05 certs -rw------- 1 root root 0 鈭? 21 18:13 psme-key


sudo ./encrypt admin

976FA284B1233EB8


user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ sudo cat /etc/psme/psme-key user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ ls -la /etc/psme/psme-key -rw------- 1 root root 0 鈭? 21 18:13 /etc/psme/psme-key


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute

modify settings and remove slot 2, 3, 4 :

sudo gedit configuration.json


cat configuration.json

{ "agent": { "vendor" : "Intel Corporation", "capabilities" : [ "Compute" ] }, "server": { "port": 7777 }, "registration": { "ipv4": "localhost", "port": 8383, "interval": 3 }, "managers": [ { "slot" : 1, "switchPortIdentifier" : "sw0p37", "ipv4": "192.168.1.190", "username": "976FA284B1233EB8", "password": "976FA284B1233EB8", "port": 623, "serialConsoleEnabled": true } ], "cyMux": { "ipv4": "127.0.0.1", "port": 5623 }, "service-uuid-file" : "/var/opt/psme/compute-service-uuid.json", "logger" : { "agent" : { "level" : "DEBUG", "timeformat" : "DATE_NS", "color" : true, "output" : true, "tagging" : true, "moredebug" : false, "streams" : [ { "type" : "STDOUT" } ] } } }


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute/src

sudo gedit main.cpp

BmcCollection load_bmcs(const json::Value& config) { BmcCollection bmcs{}; Bmc::Duration state_update_interval = GpioManager::get_instance()->get_minimal_update_interval(); for (const auto& manager : config["managers"]) { auto slot = manager["slot"].as_uint(); auto read_presence_fn = [slot]() { log_debug(GET_LOGGER("compute-agent"), "reading presence on slot: " << slot); / OEM-HC-2018-02-21-00 return GpioManager::get_instance()->is_present(uint8_t(slot)); / return true; };


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build

cmake ..


make psme-compute -j8

[100%] Linking CXX executable ../../../bin/psme-compute [100%] Built target psme-compute


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-rest-server ../../application/configuration.json


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-compute ../../agent/compute/configuration.json


PSME compute agent - display screen messages :

user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ ./psme-compute ../../agent/compute/configuration.json 2018-02-21 18:50:53.232493751 - INFO - agent - Method getChassisInfo has been registered 2018-02-21 18:50:53.232612933 - INFO - agent - Method getCollection has been registered 2018-02-21 18:50:53.232654723 - INFO - agent - Method getDriveInfo has been registered 2018-02-21 18:50:53.232681011 - INFO - agent - Method getManagersCollection has been registered 2018-02-21 18:50:53.232710141 - INFO - agent - Method getTasksCollection has been registered 2018-02-21 18:50:53.232734200 - INFO - agent - Method getManagerInfo has been registered 2018-02-21 18:50:53.232758500 - INFO - agent - Method getTaskInfo has been registered 2018-02-21 18:50:53.232781997 - INFO - agent - Method getTaskResultInfo has been registered 2018-02-21 18:50:53.232810794 - INFO - agent - Method getMemoryInfo has been registered 2018-02-21 18:50:53.232835157 - INFO - agent - Method getNetworkInterfaceInfo has been registered 2018-02-21 18:50:53.232859410 - INFO - agent - Method getNetworkDeviceInfo has been registered 2018-02-21 18:50:53.232882894 - INFO - agent - Method getNetworkDeviceFunctionInfo has been registered 2018-02-21 18:50:53.232911844 - INFO - agent - Method getProcessorInfo has been registered 2018-02-21 18:50:53.232936404 - INFO - agent - Method getStorageControllerInfo has been registered 2018-02-21 18:50:53.232965678 - INFO - agent - Method getStorageSubsystemInfo has been registered 2018-02-21 18:50:53.232989554 - INFO - agent - Method getComputerSystemInfo has been registered 2018-02-21 18:50:53.233020799 - INFO - agent - Method setComponentAttributes has been registered 2018-02-21 18:50:53.233052639 - INFO - agent - Method getTrustedModuleInfo has been registered 2018-02-21 18:50:53.233076885 - INFO - agent - Method deleteTask has been registered 2018-02-21 18:50:53.233100707 - INFO - agent - Method getMetricDefinitionInfo has been registered 2018-02-21 18:50:53.233130098 - INFO - agent - Method getMetricDefinitionsCollection has been registered 2018-02-21 18:50:53.233153740 - INFO - agent - Method getMetrics has been registered 2018-02-21 18:50:53.233176532 - INFO - agent - Method getFanInfo has been registered 2018-02-21 18:50:53.233205412 - INFO - agent - Method getPowerZoneInfo has been registered 2018-02-21 18:50:53.233229007 - INFO - agent - Method getThermalZoneInfo has been registered 2018-02-21 18:50:53.237249840 - INFO - compute-agent - MANUAL PSME BUILD; Built 18:37:34, 21-02-2018 2018-02-21 18:50:53.237313566 - DEBUG - configuration - Added file ../../agent/compute/configuration.json 2018-02-21 18:50:53.237371990 - WARN - configuration - Cannot load default file 2018-02-21 18:50:53.237396954 - INFO - configuration - Load file 2018-02-21 18:50:53.237477010 - INFO - configuration - Loaded file ../../agent/compute/configuration.json 2018-02-21 18:50:53.237520677 - INFO - configuration - Load internal defaults 2018-02-21 18:50:53.237639242 - INFO - compute-agent - JSON Schema load! 2018-02-21 18:50:53.240803812 - INFO - compute-agent - Running SDV PSME Compute Agent. 2018-02-21 18:50:53.240917041 - DEBUG - registration - Registration url: http://localhost:8383 interval: 3s 2018-02-21 18:50:53.240952064 - INFO - eventing - Starting EventDispatcher thread... 2018-02-21 18:50:53.240993166 - WARN - db - Cannot check /var/opt/psme/check_bKGJFH:: Permission denied 2018-02-21 18:50:53.241062372 - INFO - db - Database in temporary /tmp/database_BgE5zW 2018-02-21 18:50:53.241183371 - INFO - default - Service UUID 90586af4-f5c9-11e7-b8b5-1f87effca6f1. 2018-02-21 18:50:53.247234078 - DEBUG - registration - Registration response: {"ipv4address":"localhost","port":5567,"version":"1.0.0"} 2018-02-21 18:50:53.248069574 - INFO - registration - Agent has been registered to http://localhost:8383, interval 3s, rest runs for 0s 2018-02-21 18:50:53.248098767 - INFO - eventing - Sending AMC notifications enabled. Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session 2018-02-21 18:50:56.256355797 - INFO - agent - gpio minimal read interval: 5000ms 2018-02-21 18:50:56.256614261 - DEBUG - worker - Schedule periodic task state_update:192.168.1.190:0 delay: 0 period: 5000000000 2018-02-21 18:50:56.256641855 - DEBUG - worker - Schedule periodic task power_state_boot_options:192.168.1.190:1 delay: 0 period: 5000000000 2018-02-21 18:50:56.256656933 - DEBUG - worker - Schedule self sheduling task telemetry_runner:192.168.1.190:2 delay: 0 2018-02-21 18:50:56.256668440 - DEBUG - default - Waiting for interrupt signal... 2018-02-21 18:50:56.256697784 - DEBUG - compute-agent - reading presence on slot: 1 2018-02-21 18:50:56.256714787 - INFO - bmc - (192.168.1.190:623) in state: ABSENT received event: Inserted 2018-02-21 18:50:56.256721442 - INFO - bmc - (192.168.1.190:623) state transition ABSENT --> OFFLINE caused by Inserted 2018-02-21 18:50:56.256726163 - INFO - bmc - (192.168.1.190:623) transition status: OK 2018-02-21 18:50:56.256736096 - DEBUG - compute-agent - reading online state... 2018-02-21 18:50:56.267447805 - DEBUG - compute-agent - reading online state error: Can't open IPMI connection. 2018-02-21 18:50:59.255031835 - DEBUG - registration - Rest runs for 6s Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session 2018-02-21 18:51:01.256704527 - DEBUG - compute-agent - reading presence on slot: 1 2018-02-21 18:51:01.256713608 - DEBUG - compute-agent - reading online state... 2018-02-21 18:51:01.265241877 - DEBUG - compute-agent - reading online state error: Can't open IPMI connection. 2018-02-21 18:51:02.256309092 - DEBUG - registration - Rest runs for 9s 2018-02-21 18:51:05.256804813 - DEBUG - registration - Rest runs for 12s


housemic commented 6 years ago

Dear tbykowsk, in PSME server, use ipmitool to connect to BMC that is OK :

user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute$ sudo ipmitool -I lan -U admin -P admin -H 192.168.1.190 lan print Set in Progress : Set Complete Auth Type Support : MD2 MD5 PASSWORD OEM Auth Type Enable : Callback : MD2 MD5 PASSWORD OEM : User : MD2 MD5 PASSWORD OEM : Operator : MD2 MD5 PASSWORD OEM : Admin : MD2 MD5 PASSWORD OEM : OEM : MD2 MD5 PASSWORD OEM IP Address Source : DHCP Address IP Address : 192.168.1.190 Subnet Mask : 255.255.255.0 MAC Address : 00:22:44:11:33:13 SNMP Community String : AMI IP Header : TTL=0x40 Flags=0x40 Precedence=0x00 TOS=0x10 BMC ARP Control : ARP Responses Enabled, Gratuitous ARP Disabled Gratituous ARP Intrvl : 0.0 seconds Default Gateway IP : 192.168.1.1 Default Gateway MAC : 00:00:00:00:00:00 Backup Gateway IP : 0.0.0.0 Backup Gateway MAC : 00:00:00:00:00:00 802.1q VLAN ID : Disabled 802.1q VLAN Priority : 0 RMCP+ Cipher Suites : 0,1,2,3,6,7,8,11,12,15,16,17 Cipher Suite Priv Max : caaaaaaaaXXaXXX : X=Cipher Suite Unused : c=CALLBACK : u=USER : o=OPERATOR : a=ADMIN : O=OEM Bad Password Threshold : 0 Invalid password disable: no Attempt Count Reset Int.: 0 User Lockout Interval : 0


checking result : after I build encrypt and use it to input BMC user / password (admin/admin) and get a string / code : 976FA284B1233EB8, I run PSME compute agnet but get error message : Invalid user name.

checking result : additional error messages are :

Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session


checking ipmitool : use ipmitool but input incorrect username / password : test / test

                get the same error messages :

sudo ipmitool -I lan -U test -P test -H 192.168.1.190 lan print Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session


Question 11 : sudo ./encrypt admin 976FA284B1233EB8

          Is the code string the correct BMC username / password hash values 
          that for configuration.json ?

Question 11 : I get error messages :

Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session

          Is it related to Question 11 ? thank you.
housemic commented 6 years ago

Dear tbykowsk, I use another method to bypass the problems of encrypt and decrypt :

I modify settings and code to disable functions of encrypt and decrypt :

PSME code directly read the text of BMC username / password :


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute

use admin / admin as BMC username / password :

sudo gedit configuration.json


cat configuration.json

{ "agent": { "vendor" : "Intel Corporation", "capabilities" : [ "Compute" ] }, "server": { "port": 7777 }, "registration": { "ipv4": "localhost", "port": 8383, "interval": 3 }, "managers": [ { "slot" : 1, "switchPortIdentifier" : "sw0p37", "ipv4": "192.168.1.190", "username": "admin", "password": "admin", "port": 623, "serialConsoleEnabled": true } ], "cyMux": { "ipv4": "127.0.0.1", "port": 5623 }, "service-uuid-file" : "/var/opt/psme/compute-service-uuid.json", "logger" : { "agent" : { "level" : "DEBUG", "timeformat" : "DATE_NS", "color" : true, "output" : true, "tagging" : true, "moredebug" : false, "streams" : [ { "type" : "STDOUT" } ] } } }


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute/src

sudo gedit main.cpp

BmcCollection load_bmcs(const json::Value& config) { BmcCollection bmcs{}; Bmc::Duration state_update_interval = GpioManager::get_instance()->get_minimal_update_interval(); for (const auto& manager : config["managers"]) { auto slot = manager["slot"].as_uint(); auto read_presence_fn = [slot]() { log_debug(GET_LOGGER("compute-agent"), "reading presence on slot: " << slot); / OEM-HC-2018-02-21-00 return GpioManager::get_instance()->is_present(uint8_t(slot)); / return true; };

    ConnectionData connection{};
    connection.set_ip_address(manager["ipv4"].as_string());

/ OEM-HC-2018-02-21-01 connection.set_username(decrypt_value(manager["username"].as_string())); connection.set_password(decrypt_value(manager["password"].as_string())); / connection.set_username(manager["username"].as_string()); connection.set_password(manager["password"].as_string());


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build

cmake ..


make psme-compute -j8

[100%] Linking CXX executable ../../../bin/psme-compute [100%] Built target psme-compute


ls -al bin total 23468 drwxrwxr-x 5 user user 4096 鈭? 21 21:48 . drwxrwxr-x 17 user user 4096 鈭? 21 21:48 .. drwxrwxr-x 2 user user 4096 鈭? 13 22:43 certs -rwxrwxr-x 1 user user 26712 鈭? 21 18:07 encrypt drwxrwxr-x 2 user user 4096 鈭? 13 22:08 examples -rwxrwxr-x 1 user user 7503504 鈭? 21 21:48 psme-compute




cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-rest-server ../../application/configuration.json


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-compute ../../agent/compute/configuration.json


./psme-compute ../../agent/compute/configuration.json > pca.log

after 10 sec

press + press +


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

head -100 pca.log


PSME compute agent - display screen messages :

head -100 pca.log 2018-02-21 22:00:49.671105713 - INFO - agent - Method getChassisInfo has been registered 2018-02-21 22:00:49.671494368 - INFO - agent - Method getCollection has been registered 2018-02-21 22:00:49.671582789 - INFO - agent - Method getDriveInfo has been registered 2018-02-21 22:00:49.671696775 - INFO - agent - Method getManagersCollection has been registered 2018-02-21 22:00:49.671742916 - INFO - agent - Method getTasksCollection has been registered 2018-02-21 22:00:49.671785320 - INFO - agent - Method getManagerInfo has been registered 2018-02-21 22:00:49.671826400 - INFO - agent - Method getTaskInfo has been registered 2018-02-21 22:00:49.671868213 - INFO - agent - Method getTaskResultInfo has been registered 2018-02-21 22:00:49.671947051 - INFO - agent - Method getMemoryInfo has been registered 2018-02-21 22:00:49.671991124 - INFO - agent - Method getNetworkInterfaceInfo has been registered 2018-02-21 22:00:49.672031895 - INFO - agent - Method getNetworkDeviceInfo has been registered 2018-02-21 22:00:49.672073531 - INFO - agent - Method getNetworkDeviceFunctionInfo has been registered 2018-02-21 22:00:49.672154280 - INFO - agent - Method getProcessorInfo has been registered 2018-02-21 22:00:49.672236376 - INFO - agent - Method getStorageControllerInfo has been registered 2018-02-21 22:00:49.672299813 - INFO - agent - Method getStorageSubsystemInfo has been registered 2018-02-21 22:00:49.672346986 - INFO - agent - Method getComputerSystemInfo has been registered 2018-02-21 22:00:49.672399799 - INFO - agent - Method setComponentAttributes has been registered 2018-02-21 22:00:49.672517746 - INFO - agent - Method getTrustedModuleInfo has been registered 2018-02-21 22:00:49.672537824 - INFO - agent - Method deleteTask has been registered 2018-02-21 22:00:49.672561664 - INFO - agent - Method getMetricDefinitionInfo has been registered 2018-02-21 22:00:49.672581547 - INFO - agent - Method getMetricDefinitionsCollection has been registered 2018-02-21 22:00:49.672600695 - INFO - agent - Method getMetrics has been registered 2018-02-21 22:00:49.672624489 - INFO - agent - Method getFanInfo has been registered 2018-02-21 22:00:49.672643629 - INFO - agent - Method getPowerZoneInfo has been registered 2018-02-21 22:00:49.672661556 - INFO - agent - Method getThermalZoneInfo has been registered 2018-02-21 22:00:49.679070254 - INFO - compute-agent - MANUAL PSME BUILD; Built 21:48:10, 21-02-2018 2018-02-21 22:00:49.679208408 - DEBUG - configuration - Added file ../../agent/compute/configuration.json 2018-02-21 22:00:49.679386192 - WARN - configuration - Cannot load default file 2018-02-21 22:00:49.679453678 - INFO - configuration - Load file 2018-02-21 22:00:49.679652728 - INFO - configuration - Loaded file ../../agent/compute/configuration.json 2018-02-21 22:00:49.679776170 - INFO - configuration - Load internal defaults 2018-02-21 22:00:49.680061753 - INFO - compute-agent - JSON Schema load! 2018-02-21 22:00:49.685521404 - INFO - compute-agent - Running SDV PSME Compute Agent. 2018-02-21 22:00:49.685658423 - DEBUG - registration - Registration url: http://localhost:8383 interval: 3s 2018-02-21 22:00:49.685710184 - INFO - eventing - Starting EventDispatcher thread... 2018-02-21 22:00:49.685891078 - WARN - db - Cannot check /var/opt/psme/check_sU7SVy:: Permission denied 2018-02-21 22:00:49.685955695 - INFO - db - Database in temporary /tmp/database_XyoY0b 2018-02-21 22:00:49.686060242 - INFO - default - Service UUID 90586af4-f5c9-11e7-b8b5-1f87effca6f1. 2018-02-21 22:00:49.692083103 - DEBUG - registration - Registration response: {"ipv4address":"localhost","port":5567,"version":"1.0.0"} 2018-02-21 22:00:49.692759265 - INFO - registration - Agent has been registered to http://localhost:8383, interval 3s, rest runs for 196s 2018-02-21 22:00:49.692773011 - INFO - eventing - Sending AMC notifications enabled. 2018-02-21 22:00:52.695771296 - INFO - agent - gpio minimal read interval: 5000ms 2018-02-21 22:00:52.695857752 - DEBUG - worker - Schedule periodic task state_update:192.168.1.190:0 delay: 0 period: 5000000000 2018-02-21 22:00:52.695901226 - DEBUG - worker - Schedule periodic task power_state_boot_options:192.168.1.190:1 delay: 0 period: 5000000000 2018-02-21 22:00:52.695916872 - DEBUG - worker - Schedule self sheduling task telemetry_runner:192.168.1.190:2 delay: 0 2018-02-21 22:00:52.695927107 - DEBUG - compute-agent - reading presence on slot: 1 2018-02-21 22:00:52.695932301 - DEBUG - default - Waiting for interrupt signal... 2018-02-21 22:00:52.695936279 - INFO - bmc - (192.168.1.190:623) in state: ABSENT received event: Inserted 2018-02-21 22:00:52.695941163 - INFO - bmc - (192.168.1.190:623) state transition ABSENT --> OFFLINE caused by Inserted 2018-02-21 22:00:52.695944894 - INFO - bmc - (192.168.1.190:623) transition status: OK 2018-02-21 22:00:52.695948652 - DEBUG - compute-agent - reading online state... 2018-02-21 22:00:52.719562372 - INFO - bmc - (192.168.1.190:623) in state: OFFLINE received event: BecameOnline 2018-02-21 22:00:52.719574594 - INFO - bmc - (192.168.1.190:623) state transition OFFLINE --> ONLINE caused by BecameOnline 2018-02-21 22:00:52.719579722 - DEBUG - bmc - 192.168.1.190:623 reading platform id... 2018-02-21 22:00:52.722332512 - DEBUG - bmc - 192.168.1.190:623 platform id: 0xaabb 2018-02-21 22:00:52.722350361 - ERROR - bmc - No metrics defined for 43707 2018-02-21 22:00:52.722356717 - DEBUG - worker - Scheduled single run task :192.168.1.190:3 2018-02-21 22:00:52.722362188 - INFO - bmc - (192.168.1.190:623) transition status: OK 2018-02-21 22:00:52.722367643 - DEBUG - bmc - 192.168.1.190:623 reading system power status 2018-02-21 22:00:52.725197231 - DEBUG - bmc - 192.168.1.190:623 power status: On systems present: no 2018-02-21 22:00:52.725207511 - DEBUG - bmc - 192.168.1.190:623 reading system boot options 2018-02-21 22:00:52.728211169 - DEBUG - telemetry - No notifications collected from processing of metrics. 2018-02-21 22:00:52.728219123 - DEBUG - telemetry - Next reading shall be done in 0ms 2018-02-21 22:00:52.728286422 - DEBUG - bmc - 192.168.1.190:623 reading smbios region status 2018-02-21 22:00:52.728368756 - WARN - bmc - 192.168.1.190:623 smbios region status read failed: Unsupported platform 2018-02-21 22:00:52.728384121 - DEBUG - worker - Scheduled single run task :192.168.1.190:4 2018-02-21 22:00:52.728391613 - DEBUG - telemetry - No notifications collected from processing of metrics. 2018-02-21 22:00:52.728394946 - DEBUG - telemetry - Next reading shall be done in 0ms 2018-02-21 22:00:52.728400965 - DEBUG - telemetry - No notifications collected from processing of metrics. 2018-02-21 22:00:52.728403037 - DEBUG - telemetry - Next reading shall be done in 0ms 2018-02-21 22:00:52.728463096 - DEBUG - telemetry - No notifications collected from processing of metrics. 2018-02-21 22:00:52.728468221 - DEBUG - telemetry - Next reading shall be done in 0ms 2018-02-21 22:00:52.728530580 - DEBUG - telemetry - No notifications collected from processing of metrics. 2018-02-21 22:00:52.728537275 - DEBUG - telemetry - Next reading shall be done in 0ms 2018-02-21 22:00:52.728598647 - DEBUG - telemetry - No notifications collected from processing of metrics.


so after my workaround, the PSME compute agent can connect to BMC and send IPMI command (GetDeviceId) to BMC, Is it right ? thank you House

tbykowsk commented 6 years ago

Hi @housemic,

Thank you for your detailed description. Concerning problems with encryption I've noticed following issues:

  1. psme-key is expected to be in the same directory as the configuration file the agent is run with. In your case it should be in /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute/ folder. If key_file_path is not provided as an argument to Encrypter, then the default directory of key is /etc/psme.

  2. A defect has been found thanks to your observations. Encrypter is supposed to create psme-key containing random characters, not an empty file. In order to fix it O_WRONLY flag must be added to the file descriptor, so the affected line should finally look like this int fd = ::open(path.c_str(), O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IWUSR); If the key file already exists (even when it is empty) Encrypter will not overwrite it, the file must be removed manually.

    Based on logs the Compute Agent has successfully connected to BMC after your work-around.

housemic commented 6 years ago

Dear tbykowsk, thank your code change, I will add them to test.

housemic commented 6 years ago

Dear tbykowsk, about the error message - 2018-02-21 22:00:52.719579722 - DEBUG - bmc - 192.168.1.190:623 reading platform id... 2018-02-21 22:00:52.722332512 - DEBUG - bmc - 192.168.1.190:623 platform id: 0xaabb 2018-02-21 22:00:52.722350361 - ERROR - bmc - No metrics defined for 43707

I use ipmitool to send [Get Device ID] command , the IPMI command response field - [Product ID] is 0xaabb is 43707,

Question 12 - about the error message - No metrics defined for 43707 What is metrics ? Which numbers are defined by metrics ? thanks House

housemic commented 6 years ago

Dear tbykowsk, about the error message - 2018-02-21 22:00:52.728286422 - DEBUG - bmc - 192.168.1.190:623 reading smbios region status 2018-02-21 22:00:52.728368756 - WARN - bmc - 192.168.1.190:623 smbios region status read failed: Unsupported platform

Question 13 - about the error message - smbios region status read failed: Unsupported platform

Q 13.1 - Is smbios region MDR (Managed Data Region) ? Q 13.2 - so my Grantley BMC do not support MDR FW extension IPMI command, the screen display the error message, is it right ? thank you. House

tbykowsk commented 6 years ago

Ad 12. From v2.2 PSME Compute Agent provides telemetry service for supported hardware. Specific metrics for given platforms are placed here. You can find more about this feature in Chapter 2.10 of the PSME User Guide.

Ad 13. Yes, SMBIOS data is accessed via a multi-purpose Managed Data Region (MDR). PSME Compute Agent reference code was written for specific RSD hardware, therefore only platforms on which the solution was validated are fully supported. However, feel free to adjust the source code to your needs - PSME has Grantley based MDR reader - if your platform provides required IPMI commands, then you might be able to reuse it.

housemic commented 6 years ago

Dear tbykowsk - thank you, but I modify file - /PSME/encrypter/src/main.cpp void save_key(const string& path, const char* key) { int fd = ::open(path.c_str(), O_CREAT | O_EXCL | O_WRONLY, S_IRUSR | S_IWUSR);

and /etc/psme/psme-key can update new key, but test encrypt / decrypt functions, it still fail, screen display "Invalid user name", It seems the issues related to encrypt / decrypt functions, Could you have suggestions ? thank you.

House


the following is my steps to modify code -

PSME server (Grantley) - PCIe LAN IP : 192.168.1.135 (DHCP)

BMC 1 (Grantley) - BMC network IP : 192.168.1.190 (DHCP)

BMC 2 (Purley) - BMC network IP : 192.168.1.106 (DHCP)

I modify settings and code to enable functions of encrypt and decrypt :


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

ls -al /etc/psme/psme-key

sudo rm /etc/psme/psme-key

ls -la /etc/psme/psme-key

ls: cannot access '/etc/psme/psme-key': No such file or directory


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

sudo ./encrypt root

Key file not found: /etc/psme/psme-key Creating key file: /etc/psme/psme-key 856FE4F0818AF2D1


ls -al /etc/psme/psme-key

-rw------- 1 root root 8 鈭? 22 23:51 /etc/psme/psme-key


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute

use root / root (encrypted hash values) as BMC username / password :

sudo gedit configuration.json


"managers": [
    {
        "slot" : 1,
        "switchPortIdentifier" : "sw0p37",
        "ipv4": "192.168.1.106",
        "username": "856FE4F0818AF2D1",
        "password": "856FE4F0818AF2D1",
        "port": 623,
        "serialConsoleEnabled": true
    }
],


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/agent/compute/src

sudo gedit main.cpp


BmcCollection load_bmcs(const json::Value& config) { BmcCollection bmcs{}; Bmc::Duration state_update_interval = GpioManager::get_instance()->get_minimal_update_interval(); for (const auto& manager : config["managers"]) { auto slot = manager["slot"].as_uint(); auto read_presence_fn = [slot]() { log_debug(GET_LOGGER("compute-agent"), "reading presence on slot: " << slot); / OEM-HC-2018-02-21-00 return GpioManager::get_instance()->is_present(uint8_t(slot)); / return true; };

    ConnectionData connection{};
    connection.set_ip_address(manager["ipv4"].as_string());

    connection.set_username(decrypt_value(manager["username"].as_string()));
    connection.set_password(decrypt_value(manager["password"].as_string()));

/ OEM-HC-2018-02-21-01 connection.set_username(manager["username"].as_string()); connection.set_password(manager["password"].as_string()); /


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build

cmake ..


make psme-compute -j8

[100%] Linking CXX executable ../../../bin/psme-compute [100%] Built target psme-compute


ls -al bin

total 92180 drwxrwxr-x 5 user user 4096 鈭? 22 23:59 . drwxrwxr-x 17 user user 4096 鈭? 22 23:58 .. drwxrwxr-x 2 user user 4096 鈭? 13 22:43 certs -rwxrwxr-x 1 user user 26712 鈭? 22 05:25 encrypt drwxrwxr-x 2 user user 4096 鈭? 13 22:08 examples -rw-rw-r-- 1 user user 70356627 鈭? 21 22:01 pca.log -rwxrwxr-x 1 user user 7507600 鈭? 22 23:59 psme-compute


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-rest-server ../../application/configuration.json


cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin

./psme-compute ../../agent/compute/configuration.json

user@psme1:~$ cd /home/user/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin user@psme1:~/IntelRSD/intelRSD-2-2-mod-01/PSME/build/bin$ ./psme-compute ../../agent/compute/configuration.json 2018-02-23 00:03:36.815304606 - INFO - agent - Method getChassisInfo has been registered 2018-02-23 00:03:36.815636267 - INFO - agent - Method getCollection has been registered 2018-02-23 00:03:36.815768570 - INFO - agent - Method getDriveInfo has been registered 2018-02-23 00:03:36.815876965 - INFO - agent - Method getManagersCollection has been registered 2018-02-23 00:03:36.815930633 - INFO - agent - Method getTasksCollection has been registered 2018-02-23 00:03:36.815990133 - INFO - agent - Method getManagerInfo has been registered 2018-02-23 00:03:36.816040607 - INFO - agent - Method getTaskInfo has been registered 2018-02-23 00:03:36.816087261 - INFO - agent - Method getTaskResultInfo has been registered 2018-02-23 00:03:36.816166655 - INFO - agent - Method getMemoryInfo has been registered 2018-02-23 00:03:36.816189230 - INFO - agent - Method getNetworkInterfaceInfo has been registered 2018-02-23 00:03:36.816211410 - INFO - agent - Method getNetworkDeviceInfo has been registered 2018-02-23 00:03:36.816233426 - INFO - agent - Method getNetworkDeviceFunctionInfo has been registered 2018-02-23 00:03:36.816259865 - INFO - agent - Method getProcessorInfo has been registered 2018-02-23 00:03:36.816282574 - INFO - agent - Method getStorageControllerInfo has been registered 2018-02-23 00:03:36.816330963 - INFO - agent - Method getStorageSubsystemInfo has been registered 2018-02-23 00:03:36.816380841 - INFO - agent - Method getComputerSystemInfo has been registered 2018-02-23 00:03:36.816463243 - INFO - agent - Method setComponentAttributes has been registered 2018-02-23 00:03:36.816578115 - INFO - agent - Method getTrustedModuleInfo has been registered 2018-02-23 00:03:36.816641590 - INFO - agent - Method deleteTask has been registered 2018-02-23 00:03:36.816706300 - INFO - agent - Method getMetricDefinitionInfo has been registered 2018-02-23 00:03:36.816775227 - INFO - agent - Method getMetricDefinitionsCollection has been registered 2018-02-23 00:03:36.816830063 - INFO - agent - Method getMetrics has been registered 2018-02-23 00:03:36.816901631 - INFO - agent - Method getFanInfo has been registered 2018-02-23 00:03:36.817005353 - INFO - agent - Method getPowerZoneInfo has been registered 2018-02-23 00:03:36.817071183 - INFO - agent - Method getThermalZoneInfo has been registered 2018-02-23 00:03:36.823376333 - INFO - compute-agent - MANUAL PSME BUILD; Built 23:58:46, 22-02-2018 2018-02-23 00:03:36.823614135 - DEBUG - configuration - Added file ../../agent/compute/configuration.json 2018-02-23 00:03:36.823839219 - WARN - configuration - Cannot load default file 2018-02-23 00:03:36.823940961 - INFO - configuration - Load file 2018-02-23 00:03:36.824192751 - INFO - configuration - Loaded file ../../agent/compute/configuration.json 2018-02-23 00:03:36.824323249 - INFO - configuration - Load internal defaults 2018-02-23 00:03:36.824606303 - INFO - compute-agent - JSON Schema load! 2018-02-23 00:03:36.828733936 - INFO - compute-agent - Running SDV PSME Compute Agent. 2018-02-23 00:03:36.830147610 - DEBUG - registration - Registration url: http://localhost:8383 interval: 3s 2018-02-23 00:03:36.830368739 - WARN - db - Cannot check /var/opt/psme/check_EtAIWb:: Permission denied 2018-02-23 00:03:36.830410064 - INFO - eventing - Starting EventDispatcher thread... 2018-02-23 00:03:36.830586181 - INFO - db - Database in temporary /tmp/database_uUVT2e 2018-02-23 00:03:36.830888600 - INFO - default - Service UUID 90586af4-f5c9-11e7-b8b5-1f87effca6f1. 2018-02-23 00:03:36.836397831 - DEBUG - registration - Registration response: {"ipv4address":"localhost","port":5567,"version":"1.0.0"} 2018-02-23 00:03:36.836666005 - INFO - registration - Agent has been registered to http://localhost:8383, interval 3s, rest runs for 0s 2018-02-23 00:03:36.836680887 - INFO - eventing - Sending AMC notifications enabled. Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session 2018-02-23 00:03:39.844065294 - INFO - agent - gpio minimal read interval: 5000ms 2018-02-23 00:03:39.844392139 - DEBUG - worker - Schedule periodic task state_update:192.168.1.106:0 delay: 0 period: 5000000000 2018-02-23 00:03:39.844515013 - DEBUG - worker - Schedule periodic task power_state_boot_options:192.168.1.106:1 delay: 0 period: 5000000000 2018-02-23 00:03:39.844555269 - DEBUG - worker - Schedule self sheduling task telemetry_runner:192.168.1.106:2 delay: 0 2018-02-23 00:03:39.844599274 - DEBUG - default - Waiting for interrupt signal... 2018-02-23 00:03:39.844759217 - DEBUG - compute-agent - reading presence on slot: 1 2018-02-23 00:03:39.844815654 - INFO - bmc - (192.168.1.106:623) in state: ABSENT received event: Inserted 2018-02-23 00:03:39.844833569 - INFO - bmc - (192.168.1.106:623) state transition ABSENT --> OFFLINE caused by Inserted 2018-02-23 00:03:39.844840037 - INFO - bmc - (192.168.1.106:623) transition status: OK 2018-02-23 00:03:39.844852789 - DEBUG - compute-agent - reading online state... 2018-02-23 00:03:39.864972747 - DEBUG - compute-agent - reading online state error: Can't open IPMI connection. 2018-02-23 00:03:42.843673130 - DEBUG - registration - Rest runs for 6s Invalid user name Error: Unable to establish LAN session Error: Unable to establish IPMI v1.5 / RMCP session

tbykowsk commented 6 years ago

psme-key is expected to be in the same directory as the configuration file the agent is run with. You are running the agent with the following configuration:

../../agent/compute/configuration.json

therefore, you should also put psme-key in the configuration directory ../../agent/compute/ .

Alternatively - if you do not want to move existing /etc/psme/psme-key - you may copy ../../agent/compute/configuration.json to /etc/psme/ directory, and start the agent using:

./psme-compute /etc/psme/configuration.json

RobertCMa commented 6 years ago

I'm closing this issue due to inactivity, and there is another issue #53 following up. Feel free to open a new one if needed.

housemic commented 6 years ago

Dear tbykowsk, when i move psme-key to the configuration directory ../../agent/compute/ psme compute agent still have the same error message - Invalid user name

House

tbykowsk commented 6 years ago

PSME Compute Agent must use the same psme-key which was used with encrypter. I would recommend to create username/password hashes once more with a path to ../../agent/compute/psme-key provided as a parameter to encrypter.

housemic commented 6 years ago

Dear tbykowsk, the issue was closed, so I created new issue to trace this, thank you. House

Problem - PSME Compute Agent encrypt and decrypt functions fail #55