Skip to content

api: add command to list management servers#2578

Closed
marcaurele wants to merge 3 commits into
apache:masterfrom
marcaurele:list-mgmt
Closed

api: add command to list management servers#2578
marcaurele wants to merge 3 commits into
apache:masterfrom
marcaurele:list-mgmt

Conversation

@marcaurele

@marcaurele marcaurele commented Apr 18, 2018

Copy link
Copy Markdown
Member

Description

New API command to list the management servers, following the discussion on the mailing list. It adds back (I think it was removed at some point) the uuid column in the mshost table. It adds another change: the management server name is picked up from the canonical name to try to get the full name of the server for scripting purpose (for example for a SSH remote connection).

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

How Has This Been Tested?

The web interface has been tested locally along with the API call to list the management servers.

Checklist:

  • I have read the CONTRIBUTING document.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
    Testing
  • I have added tests to cover my changes.
  • All relevant new and existing integration tests have passed.
  • A full integration testsuite with all test that can run on my environment has passed.

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@marcaurele a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good but misses tests. this will be code at the basis of shutdown procedure. tests will be very much apreciated.

Comment thread api/src/main/java/com/cloud/management/ManagementServerHost.java Outdated
@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✖debian. JID-1940

@marcaurele

Copy link
Copy Markdown
Member Author

@DaanHoogland what kind of tests do you expect on a pure list operation ? I thought it's pretty straight forward and would not need any test but I'm open to add some, just not sure what to test there.

Comment thread api/src/main/java/com/cloud/management/ManagementServerHost.java Outdated
Comment thread api/src/main/java/com/cloud/management/ManagementServerHostPeer.java Outdated
Comment thread server/src/main/java/com/cloud/api/query/QueryManagerImpl.java
@DaanHoogland

Copy link
Copy Markdown
Contributor

@marcaurele I don't expect test on the list operation. it is to trivial. I am thinking about the underlying constructs, the change in the peer object, mainly. If you think those changes are to trivial as well, soit. 33 files have changed but admitted most of them only slightly.
We are going to build onb this so we might also do it in future work ;)

@DaanHoogland

Copy link
Copy Markdown
Contributor

closing to trigger CI anew

@DaanHoogland

Copy link
Copy Markdown
Contributor

open sesame (and jenkins/travis)

@DaanHoogland DaanHoogland reopened this Apr 19, 2018
@blueorangutan

Copy link
Copy Markdown

@marcaurele a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✔debian. JID-1947

@yadvr yadvr added this to the 4.12.0.0 milestone Apr 20, 2018
@marcaurele
marcaurele force-pushed the list-mgmt branch 2 times, most recently from 06bea9e to c9f9945 Compare April 23, 2018 13:17
@yadvr

yadvr commented May 9, 2018

Copy link
Copy Markdown
Member

@marcaurele nice, can you also consider adding UI changes such as a tab on left nav-bar or a section/tab on the infra page?

@marcaurele

Copy link
Copy Markdown
Member Author

@rhtyd Ok

@marcaurele

Copy link
Copy Markdown
Member Author

@rhtyd is there a source for those system images in the WUI? I would need a new one for the management server but dunno where to look for one alike.

@yadvr

yadvr commented Jul 26, 2018

Copy link
Copy Markdown
Member

@marcaurele sorry did not get the question, if you're looking for link/url where systemvmtemplates are hosted you can use the http://download.cloudstack.org/ server. Or, if you mean by having an icon for the tab see if you can find one from sprites.png or add a new one in any free space in sprites.png

@marcaurele

Copy link
Copy Markdown
Member Author

@rhtyd it was about the sprites, but I found the one I was looking for infrastructure-icons.png which does not have anything for a management server... Due you know what is the source of those images? I might simply use the same as the systemVM for the management.

@DaanHoogland

Copy link
Copy Markdown
Contributor

@marcaurele this got outdated, are you still on it?

@marcaurele

Copy link
Copy Markdown
Member Author

Moving forward, infra page lists the number of management servers:
screenshot from 2018-10-12 15-31-55

@marcaurele

Copy link
Copy Markdown
Member Author

Getting better, detail view is ready too

screenshot from 2018-10-15 10-02-39

@marcaurele

Copy link
Copy Markdown
Member Author
› cs listManagementServers --region=dev:admin    
{
  "count": 3,
  "managementserver": [
    {
      "id": "5a45d7ec-4504-4c7e-a816-76e56e030a65",
      "name": "liskam",
      "state": "Down",
      "version": "4.12.0.0-SNAPSHOT"
    },
    {
      "id": "2510dd9d-51e0-4523-9198-28835a7b2100",
      "name": "liskam",
      "state": "Down",
      "version": "4.12.0.0-SNAPSHOT"
    },
    {
      "id": "06a3eb78-cd20-42d5-ae17-9084559134d0",
      "name": "liskam",
      "state": "Up",
      "version": "4.12.0.0-SNAPSHOT"
    }
  ]
}

@marcaurele
marcaurele force-pushed the list-mgmt branch 3 times, most recently from 8e17678 to 1a186d6 Compare October 15, 2018 08:27
@marcaurele

Copy link
Copy Markdown
Member Author

The PR is ready now. Conflicts are fixed, WUI is updated with a new block for management servers with a simple detail view. cc @rhtyd @DaanHoogland @rafaelweingartner @bwsw

@yadvr

yadvr commented Oct 15, 2018

Copy link
Copy Markdown
Member

Looks great @marcaurele I'm busy this week with some outstanding issues wrt 4.11.2 release. I'll review this after that. Thanks.

Comment thread engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41120to41200.java Outdated
Comment thread framework/cluster/pom.xml
@rafaelweingartner

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@rafaelweingartner a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔centos6 ✔centos7 ✖debian. JID-2361

@GabrielBrascher

Copy link
Copy Markdown
Member

@marcaurele interesting feature 👍
It would be great to have this on 4.12.0. Could you please resolve the conflicts?

@DaanHoogland

Copy link
Copy Markdown
Contributor

@GabrielBrascher as @marcaurele indicated he's leaving the community I'll fork his branch and resubmit his code to address any issue we might still have with it.

@GabrielBrascher

Copy link
Copy Markdown
Member

@DaanHoogland sounds like a plan, thanks for pointing it out. This PR is on the list of PRs that are interesting to be merged but still need some time invested; it is almost ready, just need fixing conflicts so I hope to have it on 4.12.

@DaanHoogland

Copy link
Copy Markdown
Contributor

closing this in favour of #3150. I'll get to addressing the comments I find here in that PR

@blueorangutan

Copy link
Copy Markdown

@marcaurele a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖centos6 ✖centos7 ✖debian. JID-2569

@marcaurele

Copy link
Copy Markdown
Member Author

Sorry guys, but I don't have anymore much time to continue rebasing my code as it's not going through quick enough to avoid new conflicts. thanks @DaanHoogland to take over.

@DaanHoogland

Copy link
Copy Markdown
Contributor

no worries @marcaurele , I know you changed focus and it is all but done. thanks for much good cooperative work over the years 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants