{"action":"created","issue":{"url":"https://api.github.com/repos/xcat2/xcat-core/issues/2037","repository_url":"https://api.github.com/repos/xcat2/xcat-core","labels_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2037/labels{/name}","comments_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2037/comments","events_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2037/events","html_url":"https://github.com/xcat2/xcat-core/issues/2037","id":185476846,"number":2037,"title":"changing xcat from to postgres threw away node switch information.","user":{"login":"ralphbellofatto","id":4139514,"avatar_url":"https://avatars.githubusercontent.com/u/4139514?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbellofatto","html_url":"https://github.com/ralphbellofatto","followers_url":"https://api.github.com/users/ralphbellofatto/followers","following_url":"https://api.github.com/users/ralphbellofatto/following{/other_user}","gists_url":"https://api.github.com/users/ralphbellofatto/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbellofatto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbellofatto/subscriptions","organizations_url":"https://api.github.com/users/ralphbellofatto/orgs","repos_url":"https://api.github.com/users/ralphbellofatto/repos","events_url":"https://api.github.com/users/ralphbellofatto/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbellofatto/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-10-26T18:44:24Z","updated_at":"2016-10-26T19:09:23Z","closed_at":"2016-10-26T19:09:23Z","body":"While closing out this issue we found a problem with xcat:\r\nhttps://gitlabhost.rtp.raleigh.ibm.com/4A8491897/research-92-cluster/issues/141\r\n\r\nWe migrated our xcat db from SQLite to postgres by followed the directions here:\r\n\r\nhttp://xcat-docs.readthedocs.io/en/stable/advanced/hierarchy/databases/postgres_configure.html \r\n\r\nspecifically we executed:\r\n```\r\n1) yum install postgresql*\r\nyum install perl-DBD-Pg\r\n\r\n2) pgsqlsetup -i -V  (-V will spit out verbose output, looking at trimming this down some..) \r\n\r\nThat should automatically migrate the existing SQLite DB to PostgreSQL \r\n\r\n1:59:21 PM: Will look like this: \r\n\r\n[root@fs4 log]# lsxcatd -a\r\nVersion 2.12.4 (git commit 2bf96ee97df3e3a04ef72c42f2e756af22ecad5a, built Tue Oct 25 11:15:48 EDT 2016)\r\nThis is a Management Node\r\ncfgloc=Pg:dbname=xcatdb;host=192.168.3.25|xcatadm\r\ndbengine=Pg\r\ndbname=xcatdb\r\ndbhost=192.168.3.25\r\ndbadmin=xcatadm\r\n\r\n[root@fs4 log]# cat /etc/xcat/cfgloc \r\nPg:dbname=xcatdb;host=192.168.3.25|xcatadm|XXXXX\r\n```\r\n\r\nWhen we were done, we compared the output of the lsdef -l command with what it was prior to doing the update and we found the following two fields are missing on every node:\r\n\r\n```\r\nswitch=c460tors01\r\nswitchport=3\r\n```\r\n\r\nThe following attachment contains the before(orig) and after(new) node definitions extracted by xcat.\r\n[xcat-postgres-migrate.zip](https://github.com/xcat2/xcat-core/files/554187/xcat-postgres-migrate.zip)\r\n"},"comment":{"url":"https://api.github.com/repos/xcat2/xcat-core/issues/comments/256447440","html_url":"https://github.com/xcat2/xcat-core/issues/2037#issuecomment-256447440","issue_url":"https://api.github.com/repos/xcat2/xcat-core/issues/2037","id":256447440,"user":{"login":"ralphbellofatto","id":4139514,"avatar_url":"https://avatars.githubusercontent.com/u/4139514?v=3","gravatar_id":"","url":"https://api.github.com/users/ralphbellofatto","html_url":"https://github.com/ralphbellofatto","followers_url":"https://api.github.com/users/ralphbellofatto/followers","following_url":"https://api.github.com/users/ralphbellofatto/following{/other_user}","gists_url":"https://api.github.com/users/ralphbellofatto/gists{/gist_id}","starred_url":"https://api.github.com/users/ralphbellofatto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ralphbellofatto/subscriptions","organizations_url":"https://api.github.com/users/ralphbellofatto/orgs","repos_url":"https://api.github.com/users/ralphbellofatto/repos","events_url":"https://api.github.com/users/ralphbellofatto/events{/privacy}","received_events_url":"https://api.github.com/users/ralphbellofatto/received_events","type":"User","site_admin":false},"created_at":"2016-10-26T19:09:22Z","updated_at":"2016-10-26T19:09:22Z","body":"NOTE:\r\nWe attempted to restore the above configuration with\r\ncat node.lsdef | chdef -z\r\n\r\nAnd it failed to update the switch ports...\r\n\r\nWe extracted the data by hand from the lsdef file and then constructed a script as follows:\r\n```\r\nchdef c460c001 switch=c460tors01 switchport=3\r\nchdef c460c002 switch=c460tors01 switchport=4\r\nchdef c460c003 switch=c460tors01 switchport=5\r\nchdef c460c004 switch=c460tors01 switchport=6\r\nchdef c460c005 switch=c460tors01 switchport=7\r\n```\r\n\r\nAnd then the data stuck...\r\n\r\n"}}
{"actor":{"display_login":"ralphbellofatto"}}