Giter Site home page Giter Site logo

clusterlabs / hawk Goto Github PK

View Code? Open in Web Editor NEW
151.0 31.0 51.0 17.75 MB

A web-based GUI for managing and monitoring the Pacemaker High-Availability cluster resource manager

Home Page: http://hawk-ui.github.io/

License: GNU General Public License v2.0

Ruby 26.91% HTML 14.27% JavaScript 51.52% Shell 1.05% Makefile 0.24% C 0.46% Dockerfile 0.10% Python 3.04% SCSS 2.40%
high-availability clustering pacemaker corosync ruby ruby-on-rails crmsh javascript

hawk's People

Contributors

aleksei-burlakov avatar alvarocarvajald avatar ayoub-belarbi avatar badboywj avatar bisht-richa avatar diegoakechi avatar dzejrou avatar ghoost82 avatar krauselukas avatar krig avatar liangxin1300 avatar mallozup avatar manuelecarlini avatar petrpavlu avatar ricardobranco777 avatar t-d-oe avatar tboerger avatar thutterer avatar tserong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hawk's Issues

Fedora 31 support ?

Thanks for the project, it looks really promising

However, upstream development in several spaces that would benefit from clustering is dominated by RedHat - most notably Ceph and KVM/Libvirt - which makes it kind of puzzling why you'd be so closely aligned with OpenSUSE (?)

Is there some modifications I could make to the Makefile that would ease building on a RedHat-styled OS? I'm using Fedora 31 server.

Thanks :)

extended operation menu - off screen for all browsers

When clicking on the down arrow fro a Resource in the Operations column, if the main resource list is large enough to fill the screen, part of the extended operation menu will will be off screen (below the screen). So, please have tghe extended operation menu open so we can see all the menu items.

image

Improve issue template

we should improve the issue template for stating which OS is running hawk, since it make a difference.

Also give a section on how to reproduce etc. the classic issue template

Packaging: questionable approach when build rpms with gemfile

I found out that our current rpms use several patches. ( I have tried to remove them).

There is still one which currently disturbs me. (and create also issues on maintainance)

It is the no-dev env. . I think this patch was made to solve the mechanism of obs which try to build all Gems no matter if they are in development or other groups.

We should try to remove this patch, since it causing issue. Also I will investigate on the needs of this development utility gems.

Empty response

I tried to try out Hawk per https://github.com/krig/docker-hawk.
I started the container, did ha-cluster-init in it, and configured the admin IP, but cannot open Hawk, all I get is an empty response. I tried curling the computer's LAN address, the management addess, the computer's 127.0.0.1 and also 127.0.0.1 in the container with the same result.
The admin IP is pingable, the resource is up in crm_mon.
The command systemctl status hawk -l says:

hawk.service - HA Web Konsole
   Loaded: loaded (/usr/lib/systemd/system/hawk.service; enabled)
   Active: active (running) since Tue 2018-05-22 22:11:44 CEST; 11min ago
  Process: 320 ExecStartPre=/srv/www/hawk/bin/generate-ssl-cert (code=exited, status=0/SUCCESS)
 Main PID: 330 (puma)
   CGroup: /docker/03531e911a7a384713a37cc038c5259ec9f29e9cd5fe79c239cefd6492122276/system.slice/hawk.service
           ├─330 puma 3.4.0 (ssl://0.0.0.0:7630?cert=/etc/hawk/hawk.pem&key=/etc/hawk/hawk.key) [hawk
           └─369 puma: cluster worker 0: 330 [hawk

May 22 22:11:44 my-pc-1 systemd[1]: Started HA Web Konsole.
May 22 22:11:49 my-pc-1 puma[330]: [330] Puma starting in cluster mode...
May 22 22:11:49 my-pc-1 puma[330]: [330] * Version 3.4.0 (ruby 2.1.2-p95), codename: Owl Bowl Brawl
May 22 22:11:49 my-pc-1 puma[330]: [330] * Min threads: 0, max threads: 16
May 22 22:11:49 my-pc-1 puma[330]: [330] * Environment: production
May 22 22:11:49 my-pc-1 puma[330]: [330] * Process workers: 1
May 22 22:11:49 my-pc-1 puma[330]: [330] * Phased restart available
May 22 22:11:49 my-pc-1 puma[330]: [330] * Listening on ssl://0.0.0.0:7630?cert=/etc/hawk/hawk.pem&key=/etc/hawk/hawk.key
May 22 22:11:49 my-pc-1 puma[330]: [330] Use Ctrl-C to stop
May 22 22:12:04 my-pc-1 puma[330]: [330] - Worker 0 (pid: 369) booted, phase: 0

There is only 1 node in the cluster.

What could be the problem? What do I wrong? Should I add more nodes for Hawk to work?

Do we need detect firstly in wizards whether application installed?

For example,
I want to configure MySQL/MariaDB in wizards,
I input id and required params, leaving "install" option with “No”,
and then I click "Verify", no errors happen, and then "Apply", wizards told me "successfully",

But I got the failed status because I never installed the application.
The process can make me feel wasting time.

If we detect whether application installed firstly when user enter the specific wizards page,
if the application not installed, with "install" option "No", nothing can continue.
that's better process:)

Regards,
xin

500 Internal Server Error:cib/live/agents/ocf%253Aheartbeat%253Aapache

Hawk Version : 2.6.15
OS:ubuntu

Appearance:
when "Create Primitive " in Web GUI ,obtain error message in web page : Failed to fetch meta attributes

** Trace to :**
Request : GET | https://192.168.197.129:7630/cib/live/agents/ocf%253Aheartbeat%253Aapache?format=json
Response: 500 Internal Server Error

OS Messages about hawk service :

3月 30 19:37:27 ubuntu puma[777]: 2021-03-30 19:37:27 +0800: Rack app error handling request { GET /cib/live/agents/ocf%253Aheartbeat%253Aapache }
3月 30 19:37:27 ubuntu puma[777]: #<ActionController::RoutingError: Error: Record not found>
3月 30 19:37:27 ubuntu puma[777]: /usr/share/hawk/app/controllers/application_controller.rb:206:in not_found' 3月 30 19:37:27 ubuntu puma[777]: /usr/share/hawk/app/controllers/agents_controller.rb:38:in block (2 levels) in show'
3月 30 19:37:27 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/mime_responds.rb:203:in respond_to' 3月 30 19:37:27 ubuntu puma[777]: /usr/share/hawk/app/controllers/agents_controller.rb:37:in show'
3月 30 19:37:27 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/basic_implicit_render.rb:6:in send_action' 3月 30 19:37:27 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/actionpack-5.2.4.5/lib/abstract_controller/base.rb:194:in process_action'
3月 30 19:37:27 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/actionpack-5.2.4.5/lib/action_controller/metal/rendering.rb:30:in `process_action'

Why? thanks

Remote Hawk

Hi,

it would be great to utilize Hawk without having to install the Ruby stack and a webserver on some types of cluster nodes - for example KVM hypervisors, which one tries to keep lightweight.
Is it possible to run Hawk on a dedicated machine and have it connect to the cluster resources over the network in the backend?

I couldn't find any resources on it.

Thank you,
Georg

While changing the cluster config getting eroor message: ERROR: 2: syntax in rsc_defaults

I installed Pacemaker en CMAN on CentOS 6.5. These are the installed packages:

pacemaker-cluster-libs-1.1.10-14.el6_5.3.x86_64
pacemaker-cli-1.1.10-14.el6_5.3.x86_64
pacemaker-1.1.10-14.el6_5.3.x86_64
pacemaker-cts-1.1.10-14.el6_5.3.x86_64
pacemaker-libs-devel-1.1.10-14.el6_5.3.x86_64
pacemaker-libs-1.1.10-14.el6_5.3.x86_64
cman-3.0.12.1-59.el6_5.2.x86_64

I installed the latest Hawk version from source and it starts and stops correctly. The WebGui can be loaded without issues. When I try to change anything I initially had an error about the missing cdm command, which is normal as this is a prerequisite for Hawk. I then installed crm from http://download.opensuse.org/repositories/network:/ha-clustering:/Stable/CentOS_CentOS-6/x86_64/crmsh-2.0+git46-1.1.x86_64.rpm

When I change something to the cluster I get this error message:

Kan wijzigingen niet toepassen: ERROR: 2: syntax in rsc_defaults: Expected at least one name-value pair parsing 'rsc_defaults $id=rsc-options' ERROR: 3: syntax in op_defaults: Expected at least one name-value pair parsing 'op_defaults $id=op-options'

The first part is Dutch for: cannot apply changes

Edit configuration not working with resources with dotted name

While trying to edit resource with names like IP_1.1.1.1
I am redirected to
https://..........:7630/404.html
"We can't find the page you're looking for"
While it works for any other resource with a name without a dot it never works for resources with one or more dots in their name.

Redhat package

The documentation says you can just run make rpm to build a package for Fedora based systems. This does not appear to be the case, as it does not work on EL7 (specifically CentOS/7).

I was able to build an RPM spec file by hand and get this up and running. But I had to do a lot of really crude things in the spec file to get it working.

Additionally I've implemented a few patches to the source to resolve some issues. I would submit these as pull requests, but I'm not sure if any of them are due to the horrible spec file I had to write. If we can an get official RPM spec for EL, and the issues are still present, I'll create the PRs.

HAWK not starting on fresh install of openSUSE LEAP 15.2

Hello

if you install hawk2 on openSUSE LEAP 15.2,
hawk-backend.service will not start because of the following error:
2020-07-06T21:52:07.710011-06:00 nss-leap152 puma.ruby2.5[10033]: [10033] ! Unable to load application: Gem::ConflictError: Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= 5.2.0) 2020-07-06T21:52:07.710267-06:00 nss-leap152 puma.ruby2.5[10033]: /usr/lib64/ruby/2.5.0/rubygems/specification.rb:2327:in raise_if_conflicts': Unable to activate sass-rails-5.1.0, because railties-5.1.4 conflicts with railties (>= 5.2.0) (Gem::ConflictError)
`

I found a simple "workaround" to fix this issue by locking the package "ruby2.5-rubygem-railties-5.2" before installing hawk.
Then only "ruby2.5-rubygem-railties-5_1" will be installed and every works fine.

I saw at least the package "ruby2.5-rubygem-sass-rails-5.1" requires "rubygem(ruby:2.5.0:railties) >= 5.2.0" and if you want to try installing it alone after locking "ruby2.5-rubygem-railties-5.2" you get a missing dependency error.
But not when try to install hawk2.

Logs/"zypper in" output:
Nothing locked: no issues for zipper but hawk-backend.service will not start

root:~ # zypper in hawk2
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 90 NEW packages are going to be installed:
  cluster-glue corosync crmsh crmsh-scripts csync2 hawk-apiserver hawk2 libcfg6 libcmap4 libcorosync_common4 libcpg4 libglue2 libpacemaker3 libqb20 libquorum5 librsync2 libsam4 libtotem_pg5 libvotequorum8 mozilla-nss-tools pacemaker
  pacemaker-cli python3-cssselect python3-lxml python3-parallax python3-python-dateutil resource-agents ruby2.5-rubygem-actioncable-5_1 ruby2.5-rubygem-actionmailer-5_1 ruby2.5-rubygem-actionpack-5.2 ruby2.5-rubygem-actionpack-5_1
  ruby2.5-rubygem-actionview-5.2 ruby2.5-rubygem-actionview-5_1 ruby2.5-rubygem-activejob-5_1 ruby2.5-rubygem-activemodel-5_1 ruby2.5-rubygem-activerecord-5_1 ruby2.5-rubygem-activesupport-5.2 ruby2.5-rubygem-activesupport-5_1
  ruby2.5-rubygem-arel ruby2.5-rubygem-axiom-types ruby2.5-rubygem-builder ruby2.5-rubygem-bundler ruby2.5-rubygem-coercible ruby2.5-rubygem-concurrent-ruby ruby2.5-rubygem-crass ruby2.5-rubygem-descendants_tracker
  ruby2.5-rubygem-equalizer ruby2.5-rubygem-erubi ruby2.5-rubygem-ffi ruby2.5-rubygem-gettext ruby2.5-rubygem-gettext_i18n_rails ruby2.5-rubygem-gettext_i18n_rails_js ruby2.5-rubygem-globalid ruby2.5-rubygem-i18n ruby2.5-rubygem-ice_nine
  ruby2.5-rubygem-js-routes ruby2.5-rubygem-kramdown ruby2.5-rubygem-locale ruby2.5-rubygem-loofah ruby2.5-rubygem-mail ruby2.5-rubygem-method_source ruby2.5-rubygem-mini_mime ruby2.5-rubygem-mini_portile2 ruby2.5-rubygem-nio4r
  ruby2.5-rubygem-nokogiri ruby2.5-rubygem-po_to_json ruby2.5-rubygem-puma ruby2.5-rubygem-rack ruby2.5-rubygem-rack-test-0_6 ruby2.5-rubygem-rails-5_1 ruby2.5-rubygem-rails-dom-testing ruby2.5-rubygem-rails-html-sanitizer
  **ruby2.5-rubygem-railties-5.2 ruby2.5-rubygem-railties-5_1** ruby2.5-rubygem-rb-fsevent ruby2.5-rubygem-rb-inotify ruby2.5-rubygem-sass ruby2.5-rubygem-sass-listen **ruby2.5-rubygem-sass-rails-5.1** ruby2.5-rubygem-sprockets
  ruby2.5-rubygem-sprockets-rails ruby2.5-rubygem-text ruby2.5-rubygem-thor ruby2.5-rubygem-thread_safe ruby2.5-rubygem-tilt ruby2.5-rubygem-tzinfo-1.2 ruby2.5-rubygem-virtus ruby2.5-rubygem-websocket-driver-0_6
  ruby2.5-rubygem-websocket-extensions sqlite3

90 new packages to install.
Overall download size: 39.3 MiB. Already cached: 0 B. After the operation, additional 90.4 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): n

Locking "ruby2.5-rubygem-railties-5.2":
ruby2.5-rubygem-sass-rails-5.1 cannot be installed ...

root:~ # zypper al ruby2.5-rubygem-railties-5.2
Specified lock has been successfully added.
root:~ # zypper in ruby2.5-rubygem-sass-rails-5.1
Loading repository data...
Reading installed packages...
Resolving package dependencies...

Problem: ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64 requires rubygem(ruby:2.5.0:railties) >= 5.2.0, but this requirement cannot be provided
  not installable providers: ruby2.5-rubygem-railties-5.2-5.2.3-lp152.2.3.x86_64[susemanager:opensuse_leap15_2-x86_64]
 Solution 1: remove lock to allow installation of ruby2.5-rubygem-railties-5.2-5.2.3-lp152.2.3.x86_64[susemanager:opensuse_leap15_2-x86_64]
 Solution 2: do not install ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64
 Solution 3: break ruby2.5-rubygem-sass-rails-5.1-5.1.0-lp152.1.1.x86_64 by ignoring some of its dependencies

Choose from above solutions by number or cancel [1/2/3/c/d/?] (c):

... but hawk2 can. And is running fine as it should:

root:~ # zypper in hawk2
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 86 NEW packages are going to be installed:
  cluster-glue corosync crmsh crmsh-scripts csync2 hawk-apiserver hawk2 libcfg6 libcmap4 libcorosync_common4 libcpg4 libglue2 libpacemaker3 libqb20 libquorum5 librsync2 libsam4 libtotem_pg5 libvotequorum8 mozilla-nss-tools pacemaker
  pacemaker-cli python3-cssselect python3-lxml python3-parallax python3-python-dateutil resource-agents ruby2.5-rubygem-actioncable-5_1 ruby2.5-rubygem-actionmailer-5_1 ruby2.5-rubygem-actionpack-5_1 ruby2.5-rubygem-actionview-5_1
  ruby2.5-rubygem-activejob-5_1 ruby2.5-rubygem-activemodel-5_1 ruby2.5-rubygem-activerecord-5_1 ruby2.5-rubygem-activesupport-5_1 ruby2.5-rubygem-arel ruby2.5-rubygem-axiom-types ruby2.5-rubygem-builder ruby2.5-rubygem-bundler
  ruby2.5-rubygem-coercible ruby2.5-rubygem-concurrent-ruby ruby2.5-rubygem-crass ruby2.5-rubygem-descendants_tracker ruby2.5-rubygem-equalizer ruby2.5-rubygem-erubi ruby2.5-rubygem-ffi ruby2.5-rubygem-gettext
  ruby2.5-rubygem-gettext_i18n_rails ruby2.5-rubygem-gettext_i18n_rails_js ruby2.5-rubygem-globalid ruby2.5-rubygem-i18n ruby2.5-rubygem-ice_nine ruby2.5-rubygem-js-routes ruby2.5-rubygem-kramdown ruby2.5-rubygem-locale
  ruby2.5-rubygem-loofah ruby2.5-rubygem-mail ruby2.5-rubygem-method_source ruby2.5-rubygem-mini_mime ruby2.5-rubygem-mini_portile2 ruby2.5-rubygem-nio4r ruby2.5-rubygem-nokogiri ruby2.5-rubygem-po_to_json ruby2.5-rubygem-puma
  ruby2.5-rubygem-rack ruby2.5-rubygem-rack-test-0_6 ruby2.5-rubygem-rails-5_1 ruby2.5-rubygem-rails-dom-testing ruby2.5-rubygem-rails-html-sanitizer ruby2.5-rubygem-railties-5_1 ruby2.5-rubygem-rb-fsevent ruby2.5-rubygem-rb-inotify
  ruby2.5-rubygem-sass ruby2.5-rubygem-sass-listen ruby2.5-rubygem-sass-rails ruby2.5-rubygem-sprockets ruby2.5-rubygem-sprockets-rails ruby2.5-rubygem-text ruby2.5-rubygem-thor ruby2.5-rubygem-thread_safe ruby2.5-rubygem-tilt
  ruby2.5-rubygem-tzinfo-1.2 ruby2.5-rubygem-virtus ruby2.5-rubygem-websocket-driver-0_6 ruby2.5-rubygem-websocket-extensions sqlite3

86 new packages to install.
Overall download size: 37.5 MiB. Already cached: 0 B. After the operation, additional 85.7 MiB will be used.
Continue? [y/n/v/...? shows all options] (y):

==============
As I saw that there is already an issue regarding "sass-rails" I thought this might help, sorting these rails dependencies out :)

Dockerised Hawk?

It would be great if Hawk had an official Dockerfile, this would mean anyone who wanted to use it could deploy it anywhere they could run Docker and it could contain just the bare minimum set of packages required to run the application.

Thoughts / comments / abuse all welcome :)

Hawk:Rack app error handling request { GET /roboto-v15-latin-regular.woff }

Hawk Version : 2.6.15
OS:ubuntu

OS error Messages periodicity about hawk service by "journalctl -xf" :

3月 30 22:13:03 ubuntu puma[777]: 2021-03-30 22:13:03 +0800: Rack app error handling request { GET /roboto-v15-latin-regular.woff }
3月 30 22:13:03 ubuntu puma[777]: #<Errno::EACCES: Permission denied @ utime_internal - /usr/share/hawk/tmp/cache/assets/sprockets/v3.0/oR/oRRLppPQiVBIkytrZdGaoQR5Ua0aEDmLHC7DaxpxWKs.cache>
3月 30 22:13:03 ubuntu puma[777]: /usr/lib/ruby/2.3.0/fileutils.rb:1154:in utime' 3月 30 22:13:03 ubuntu puma[777]: /usr/lib/ruby/2.3.0/fileutils.rb:1154:in block in touch'
3月 30 22:13:03 ubuntu puma[777]: /usr/lib/ruby/2.3.0/fileutils.rb:1151:in each' 3月 30 22:13:03 ubuntu puma[777]: /usr/lib/ruby/2.3.0/fileutils.rb:1151:in touch'
3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/cache/file_store.rb:67:in get' 3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/cache.rb:208:in get'
3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/cache.rb:83:in fetch' 3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/base.rb:56:in file_digest'
3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/unloaded_asset.rb:104:in dependency_history_key' 3月 30 22:13:03 ubuntu puma[777]: /var/lib/gems/2.3.0/gems/sprockets-3.7.2/lib/sprockets/loader.rb:304:in fetch_asset_from_dependency_cache'

How to solve it ? thnks

Resource operations pop up menu is hidden by the table edge

The action pop-out menu lives inside the iframe of the bootstrap table, so if you open the menu for the last item in the list, it gets covered in an ugly way and you have to scroll down to see it. Is there any way to have that menu be outside of the bootstrap table frame?

We need some clever javascript/CSS trick to move the popup out of the table frame..

Hawk not updating resource list

When issuing a command line command for resource creation like:

crm configure primitive stateful-1 ocf:pacemaker:Stateful \ 
        op monitor interval=10s \ 
        op monitor interval=5s role=Master

and being successfully created as can be checked with:

crm configure show

Hawk does not show it in the MONITORING > Status > Resources tab.

colon (':') in the RA link encoded twice

On the Status page there is a column with resource agent links. One such link is like this (got with "Copy Link Location" in Firefox):
https://localhost:7630/cib/live/agents/ocf%253Aheartbeat%253ADummy
Otherwise it looks normal on the page: ocf:heartbeat:Dummy
In Firefox, hovering over the link shows in the lower left corner:
https://localhost:7630/cib/live/agents/ocf%3Aheartbeat%3ADummy
Apparently, the ':' is encoded into "%3A" which is then further encoded as "%253A", i.e. that '%' gets encoded too.
The version is:
hawk2-2.1.0+git.1562924574.34a87ad7-236.10.x86_64

Error messages not showed

When leaving some ID's input empty, errors messages not showed.
For example,
when adding primitive resource, empty ID will cause "ID ID is required, ID Invalid ID" shown on the top;
when adding colocation with empty ID, record.erros.full_messages already has above error message,
but it can not be shown on top of the web page

Regards,
xin

Debian Support

To your knowledge has anyone had hawk working on Debian - What could you see preventing this?

Screenshots / Demo

Hi, Any chance of some screenshots or a demo since it's a web product?

centos7.6 Unable to display login page

Steps to reproduce

  1. I have carried out the installation steps correctly
  2. I run the following command to start the server and it doesn't seem to be a problem
[root@node190 bin]# ./hawk  start
[12841] Puma starting in cluster mode...
[12841] * Version 4.3.5 (ruby 2.5.5-p157), codename: Mysterious Traveller
[12841] * Min threads: 0, max threads: 1
[12841] * Environment: development
[12841] * Process workers: 1
[12841] * Preloading application
[12841] * Listening on unix:///usr/share/hawk/tmp/hawk.sock
[12841] ! WARNING: Detected 1 Thread(s) started in app boot:
[12841] ! #<Thread:0x00000000034a3aa0@/opt/rh/rh-ruby25/root/usr/share/gems/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:38 sleep_forever> - /opt/rh/rh-ruby25/root/usr/share/gems/gems/concurrent-ruby-1.1.6/lib/concurrent-ruby/concurrent/atomic/ruby_thread_local_var.rb:40:in `pop'
[12841] Use Ctrl-C to stop
[12841] - Worker 0 (pid: 12876) booted, phase: 0
  1. But when I visit the web : https://:7630,Nothing
    image

  2. I made an error while testing the hawkapi-server project,It seems that there is no route. I need to write swagger.json?

[root@node190 bin]# curl --insecure -u hacluster:password https://<ip>:7630/api/v1/cib
[api/v1]: No route for /api/v1/cib

In the fedora 36 x86_64 cann't succesful login

OS: Fedora 36 x86_64
ruby: ruby 2.7.6
hawk: hawk-2.6.15
After I successfully installed hawk 2.6.15 in the fedora 36 x86_64,I use ruby's version is 2.7.6, I can run hawk successfully. But when I login with the correct username and password. WEB interface report: Invalid username or password.
The system log is as follows:
2022-06-27T14:31:21.925773+08:00 tot5 audit[32863]: USER_AUTH pid=32863 uid=600 auid=4294967295 ses=4294967295 subj=kernel msg='op=PAM:authentication grantors=?acct="hacluster " exe="/usr/sbin/hawk_chkpwd" hostname=?addr=?terminal=?res=failed'
2022-06-27T14:31:21.926473+08:00 tot5 hawk_chkpwd[32863]: pam_authenticate(passwd, hacluster): Authentication failure

Suggestion: unified Yes/No or true/false for boolean config options

For example, in "Cluster Configuration" page,
the value can be selected for "stonith-enabled" are "Yes/No",
but at right of the page, help messages said it's default value is "true";

It's a little bit strange although users can understand the difference.

Regards,
xin

HAWK in a subdirectory

I've tried all sorts of combinations of config.relative_url_root and ENV["ROOT_URL"] but hawk refuses to run in a subdirectory.

Is this a puma issue or a hawk issue?

Solaris/Illumos support

Last year I made a version hawk 0.6.3 for our Solaris and OpenIndiana based clusters with corosync and pacemaker. The ywork without any problems.

I made now tests hawk 1.0.0.alpha1.
During login I get HTTP 500. I used the loglevel debug and file for logging.
I used in config/environments/production.rb this:

  config.log_level = :debug
  config.log_tags = []

  config.logger = ActiveSupport::TaggedLogging.new(
      Logger.new('/var/lighttpd/1.4/docroot/hawk/log/production.log')
  )

This is the content of the logfile:

Started GET "/login" for 10.50.132.36 at 2015-08-02 21:58:39 +0200
Processing by SessionsController#new as HTML
  Rendered sessions/new.html.haml within layouts/authentication (24.2ms)
  Rendered shared/_flash.html.haml (2.2ms)
  Rendered shared/_modal.html.haml (1.4ms)
Completed 200 OK in 736ms (Views: 734.1ms)
Started GET "/assets/vendor-a0b5b02904ea827375584cc8d1b98ad3194a2034485baac627d59f72dd6975ed.css" for 10.50.132.36 at 2015-08-02 21:58:39 +0200
Started GET "/assets/authentication-57be8f733ad9715ca326a130d3e351911b90beed51240c509e25b03a46cc043f.css" for 10.50.132.36 at 2015-08-02 21:58:39 +0200
Started GET "/assets/vendor-fc533bfe4c75ef7ccd2c44f81e34d44209a426f536d2c8bdd7d8be28fb1174f4.js" for 10.50.132.36 at 2015-08-02 21:58:40 +0200
Started GET "/assets/authentication-422f6e5bc7ca36d9a420188397b3e381dc59e13df08bf4693bb07ac94e3616c7.js" for 10.50.132.36 at 2015-08-02 21:58:41 +0200
Started GET "/assets/locale/en_US-4192f6db56647cfa14d46b2312451d2251dfba9c2e1cb8ac1d8f19b7cf86e0db.js" for 10.50.132.36 at 2015-08-02 21:58:41 +0200
Started GET "/assets/logo/white-e03664b0620722f6325b0ce2da1330199858d7694bc99856dcc3a1be976a9d96.png" for 10.50.132.36 at 2015-08-02 21:58:42 +0200
Started GET "/assets/favicon-0ec44afa412720bfa8d8a324b911704f348602e2966205419723b38034ab9db7.png" for 10.50.132.36 at 2015-08-02 21:58:42 +0200
Started POST "/login" for 10.50.132.36 at 2015-08-02 21:58:49 +0200
Processing by SessionsController#create as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"lQa0e43Fk2L2xy9nFnwhxG1TCTGD2UFWqHGUw33QLfjKZkl3jRs3GY4yOK2+cTZN8gvNLnsr44GGPe/ozf2LYg==", "session"=>{"username"=>"hacluster", "password"=>"[FILTERED]"}, "commit"=>"Login"}
Redirected to https://zd-sol-s2.zdkwh.mlrbw.net:7630/
Completed 302 Found in 124ms
Started GET "/" for 10.50.132.36 at 2015-08-02 21:58:49 +0200
Processing by PagesController#index as HTML
Cib.initialize live, hacluster, false
Redirected to https://zd-sol-s2.zdkwh.mlrbw.net:7630/cib/live/state
Completed 301 Moved Permanently in 1141ms
Started GET "/cib/live/state" for 10.50.132.36 at 2015-08-02 21:58:50 +0200
Processing by StatesController#show as HTML
  Parameters: {"cib_id"=>"live"}
Cib.initialize live, hacluster, false
  Rendered states/show.html.haml within layouts/application (28.9ms)
Completed 500 Internal Server Error in 1118ms

Is this really the output which should be created when the loglevel debug and the logger of rails are used?
No timestamp, no loglevel, no module?

When I catch all systemcalls with "truss -f ..." (a Solaris utility) I found this exception:

Exception handling servers: /var/lighttpd/1.4/docroot/hawk/app/views/layouts/application.html.haml:6: syntax error, unexpected tPOW, expecting ')'
_hamlout.attributes({}, nil,  **body_attrs )}>\n<div#{
                                ^ (SyntaxError)20587/8: lwp_park(0x00000000, 9)                         = 0
20585/8:        clock_gettime(4, 0xFFFF80FFBE5FB560)            = 0
20587/9:        write(2, " E x c e p t i o n   h a".., 249)     = 249

This error message should be contained in the logfile but is not.
I guess the configuration concerning the logging is wrong.
My knowledge of ruby and rails is very limited and I would appreciate any hints to get more debugging output.

Could this be an incompatibilty with ruby 1.9.3?

Andreas

remote connection environment variables not preserved

cibadmin and some other utilities are run by hawk_invoke which clears the environment. Should it preserve CIB_host, CIB_user and others to be able to connect to a remote cluster node? The use case is to run hawk on a node which is not part of the cluster, for instance if the cluster runs on Debian where hawk is not readily available as a software package.
The remote connection is described here: https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Administration/#s-remote-connection

E2E Tests improvments

This epic wants to track from highlevel pov what we might tackle as steps to improve E2E test experience.

Feel free to extend this epic

Coverage:

Goal of this is to improve the testing coverage of hawk. Normally it has more priority over improvements of the testing framework/refactorings etc.

    1. check if hawk is consuming more then 90%cpu during the testsuite ( this was a bug in the past)

Testing framework/Tests

  1. Have a summary minimalistic, colored output on terminal. (investigate the adoption of pylint)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.