Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0d442d26
Commit
0d442d26
authored
Mar 22, 2019
by
Michael Kozono
Committed by
Mike Greiling
Mar 22, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use help path as provided by HAML
Adds Geo troubleshoot docs URL to error message section.
parent
e15bb700
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
130 additions
and
8 deletions
+130
-8
doc/administration/geo/replication/troubleshooting.md
doc/administration/geo/replication/troubleshooting.md
+58
-1
ee/app/assets/javascripts/geo_nodes/components/app.vue
ee/app/assets/javascripts/geo_nodes/components/app.vue
+5
-0
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
...ets/javascripts/geo_nodes/components/geo_node_details.vue
+12
-1
ee/app/assets/javascripts/geo_nodes/components/geo_node_item.vue
...assets/javascripts/geo_nodes/components/geo_node_item.vue
+14
-1
ee/app/assets/javascripts/geo_nodes/components/geo_nodes_list.vue
...ssets/javascripts/geo_nodes/components/geo_nodes_list.vue
+5
-0
ee/app/assets/javascripts/geo_nodes/index.js
ee/app/assets/javascripts/geo_nodes/index.js
+4
-1
ee/app/assets/stylesheets/pages/geo_nodes.scss
ee/app/assets/stylesheets/pages/geo_nodes.scss
+1
-1
ee/app/helpers/ee/geo_helper.rb
ee/app/helpers/ee/geo_helper.rb
+2
-1
ee/changelogs/unreleased/mk-suggest-geo-check-in-error.yml
ee/changelogs/unreleased/mk-suggest-geo-check-in-error.yml
+5
-0
ee/spec/javascripts/geo_nodes/components/app_spec.js
ee/spec/javascripts/geo_nodes/components/app_spec.js
+1
-0
ee/spec/javascripts/geo_nodes/components/geo_node_details_spec.js
...javascripts/geo_nodes/components/geo_node_details_spec.js
+13
-0
ee/spec/javascripts/geo_nodes/components/geo_node_item_spec.js
...ec/javascripts/geo_nodes/components/geo_node_item_spec.js
+6
-2
ee/spec/javascripts/geo_nodes/components/geo_nodes_list_spec.js
...c/javascripts/geo_nodes/components/geo_nodes_list_spec.js
+1
-0
locale/gitlab.pot
locale/gitlab.pot
+3
-0
No files found.
doc/administration/geo/replication/troubleshooting.md
View file @
0d442d26
...
...
@@ -23,12 +23,69 @@ to help identify if something is wrong:
![
Geo health check
](
img/geo_node_healthcheck.png
)
There is also an option to check the status of the
**secondary**
node by running a special rake task:
If the UI is not working, or you are unable to log in, you can run the Geo
health check manually to get this information as well as a few more details.
This rake task can be run on an app node in the
**primary**
or
**secondary**
Geo nodes:
```
sh
sudo
gitlab-rake gitlab:geo:check
```
Example output:
```
Checking Geo ...
GitLab Geo is available ... yes
GitLab Geo is enabled ... yes
GitLab Geo secondary database is correctly configured ... yes
Using database streaming replication? ... yes
GitLab Geo tracking database is configured to use Foreign Data Wrapper? ... yes
GitLab Geo tracking database Foreign Data Wrapper schema is up-to-date? ... yes
GitLab Geo HTTP(S) connectivity ...
* Can connect to the primary node ... yes
HTTP/HTTPS repository cloning is enabled ... yes
Machine clock is synchronized ... yes
Git user has default SSH configuration? ... yes
OpenSSH configured to use AuthorizedKeysCommand ... yes
GitLab configured to disable writing to authorized_keys file ... yes
GitLab configured to store new projects in hashed storage? ... yes
All projects are in hashed storage? ... yes
Checking Geo ... Finished
```
Current sync information can be found manually by running this rake task on any
**secondary**
app node:
```
sh
sudo
gitlab-rake geo:status
```
Example output:
```
http://secondary.example.com/
-----------------------------------------------------
GitLab Version: 11.8.1-ee
Geo Role: Secondary
Health Status: Healthy
Repositories: 190/190 (100%)
Verified Repositories: 190/190 (100%)
Wikis: 190/190 (100%)
Verified Wikis: 190/190 (100%)
LFS Objects: 35/35 (100%)
Attachments: 528/528 (100%)
CI job artifacts: 477/477 (100%)
Repositories Checked: 0/190 (0%)
Sync Settings: Full
Database replication lag: 0 seconds
Last event ID seen from primary: 2158 (about 2 minute ago)
Last event ID processed by cursor: 2158 (about 2 minute ago)
Last status report was: 4 minutes ago
```
## Is Postgres replication working?
### Are my nodes pointing to the correct database instance?
...
...
ee/app/assets/javascripts/geo_nodes/components/app.vue
View file @
0d442d26
...
...
@@ -34,6 +34,10 @@ export default {
type
:
Boolean
,
required
:
true
,
},
geoTroubleshootingHelpPath
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -213,6 +217,7 @@ export default {
:primary-node=
"node.primary"
:node-actions-allowed=
"nodeActionsAllowed"
:node-edit-allowed=
"nodeEditAllowed"
:geo-troubleshooting-help-path=
"geoTroubleshootingHelpPath"
/>
<deprecated-modal
v-show=
"showModal"
...
...
ee/app/assets/javascripts/geo_nodes/components/geo_node_details.vue
View file @
0d442d26
<
script
>
/* eslint-disable vue/no-side-effects-in-computed-properties */
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
{
s__
}
from
'
~/locale
'
;
import
NodeDetailsSectionMain
from
'
./node_detail_sections/node_details_section_main.vue
'
;
...
...
@@ -9,6 +10,7 @@ import NodeDetailsSectionOther from './node_detail_sections/node_details_section
export
default
{
components
:
{
GlLink
,
NodeDetailsSectionMain
,
NodeDetailsSectionSync
,
NodeDetailsSectionVerification
,
...
...
@@ -31,6 +33,10 @@ export default {
type
:
Boolean
,
required
:
true
,
},
geoTroubleshootingHelpPath
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -80,7 +86,12 @@ export default {
:node-type-primary=
"node.primary"
/>
<div
v-if=
"hasError || hasVersionMismatch"
class=
"node-health-message-container"
>
<p
class=
"node-health-message"
>
{{
errorMessage
}}
</p>
<p
class=
"node-health-message"
>
{{
errorMessage
}}
<gl-link
:href=
"geoTroubleshootingHelpPath"
>
{{
s__
(
'
Geo|Please refer to Geo Troubleshooting.
'
)
}}
</gl-link>
</p>
</div>
</div>
</
template
>
ee/app/assets/javascripts/geo_nodes/components/geo_node_item.vue
View file @
0d442d26
<
script
>
import
{
GlLink
}
from
'
@gitlab/ui
'
;
import
eventHub
from
'
../event_hub
'
;
import
GeoNodeHeader
from
'
./geo_node_header.vue
'
;
...
...
@@ -6,6 +8,7 @@ import GeoNodeDetails from './geo_node_details.vue';
export
default
{
components
:
{
GlLink
,
GeoNodeHeader
,
GeoNodeDetails
,
},
...
...
@@ -26,6 +29,10 @@ export default {
type
:
Boolean
,
required
:
true
,
},
geoTroubleshootingHelpPath
:
{
type
:
String
,
required
:
true
,
},
},
data
()
{
return
{
...
...
@@ -84,9 +91,15 @@ export default {
:node-details=
"nodeDetails"
:node-edit-allowed=
"nodeEditAllowed"
:node-actions-allowed=
"nodeActionsAllowed"
:geo-troubleshooting-help-path=
"geoTroubleshootingHelpPath"
/>
<div
v-if=
"isNodeDetailsFailed"
class=
"node-health-message-container"
>
<p
class=
"health-message node-health-message"
>
{{
errorMessage
}}
</p>
<p
class=
"node-health-message"
>
{{
errorMessage
}}
<gl-link
:href=
"geoTroubleshootingHelpPath"
>
{{
s__
(
'
Geo|Please refer to Geo Troubleshooting.
'
)
}}
</gl-link>
</p>
</div>
</div>
</
template
>
ee/app/assets/javascripts/geo_nodes/components/geo_nodes_list.vue
View file @
0d442d26
...
...
@@ -18,6 +18,10 @@ export default {
type
:
Boolean
,
required
:
true
,
},
geoTroubleshootingHelpPath
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
...
...
@@ -31,6 +35,7 @@ export default {
:primary-node=
"node.primary"
:node-actions-allowed=
"nodeActionsAllowed"
:node-edit-allowed=
"nodeEditAllowed"
:geo-troubleshooting-help-path=
"geoTroubleshootingHelpPath"
/>
</div>
</
template
>
ee/app/assets/javascripts/geo_nodes/index.js
View file @
0d442d26
...
...
@@ -24,9 +24,10 @@ export default () => {
},
data
()
{
const
{
dataset
}
=
this
.
$options
.
el
;
const
{
primaryVersion
,
primaryRevision
,
geoTroubleshootingHelpPath
}
=
dataset
;
const
nodeActionsAllowed
=
parseBoolean
(
dataset
.
nodeActionsAllowed
);
const
nodeEditAllowed
=
parseBoolean
(
dataset
.
nodeEditAllowed
);
const
store
=
new
GeoNodesStore
(
dataset
.
primaryVersion
,
dataset
.
primaryRevision
);
const
store
=
new
GeoNodesStore
(
primaryVersion
,
primaryRevision
);
const
service
=
new
GeoNodesService
();
return
{
...
...
@@ -34,6 +35,7 @@ export default () => {
service
,
nodeActionsAllowed
,
nodeEditAllowed
,
geoTroubleshootingHelpPath
,
};
},
render
(
createElement
)
{
...
...
@@ -43,6 +45,7 @@ export default () => {
service
:
this
.
service
,
nodeActionsAllowed
:
this
.
nodeActionsAllowed
,
nodeEditAllowed
:
this
.
nodeEditAllowed
,
geoTroubleshootingHelpPath
:
this
.
geoTroubleshootingHelpPath
,
},
});
},
...
...
ee/app/assets/stylesheets/pages/geo_nodes.scss
View file @
0d442d26
...
...
@@ -85,7 +85,7 @@
.node-health-message
{
margin-bottom
:
0
;
padding
:
2px
$gl-padding-8
;
padding
:
$gl-padding
;
background-color
:
$red-100
;
color
:
$red-500
;
}
...
...
ee/app/helpers/ee/geo_helper.rb
View file @
0d442d26
...
...
@@ -30,7 +30,8 @@ module EE
primary_version:
version
.
to_s
,
primary_revision:
revision
.
to_s
,
node_actions_allowed:
::
Gitlab
::
Database
.
db_read_write?
.
to_s
,
node_edit_allowed:
::
Gitlab
::
Geo
.
license_allows?
.
to_s
node_edit_allowed:
::
Gitlab
::
Geo
.
license_allows?
.
to_s
,
geo_troubleshooting_help_path:
help_page_path
(
'administration/geo/replication/troubleshooting.md'
)
}
end
...
...
ee/changelogs/unreleased/mk-suggest-geo-check-in-error.yml
0 → 100644
View file @
0d442d26
---
title
:
'
Geo:
Help
admins
diagnose
configuration
problems'
merge_request
:
9988
author
:
type
:
added
ee/spec/javascripts/geo_nodes/components/app_spec.js
View file @
0d442d26
...
...
@@ -26,6 +26,7 @@ const createComponent = () => {
service
,
nodeActionsAllowed
:
true
,
nodeEditAllowed
:
true
,
geoTroubleshootingHelpPath
:
'
/foo/bar
'
,
});
};
...
...
ee/spec/javascripts/geo_nodes/components/geo_node_details_spec.js
View file @
0d442d26
...
...
@@ -17,6 +17,7 @@ const createComponent = ({
nodeDetails
,
nodeActionsAllowed
,
nodeEditAllowed
,
geoTroubleshootingHelpPath
:
'
/foo/bar
'
,
});
};
...
...
@@ -80,5 +81,17 @@ describe('GeoNodeDetailsComponent', () => {
it
(
'
renders container elements correctly
'
,
()
=>
{
expect
(
vm
.
$el
.
classList
.
contains
(
'
card-body
'
)).
toBe
(
true
);
});
it
(
'
renders troubleshooting URL within error message section
'
,
done
=>
{
vm
.
nodeDetails
.
healthy
=
false
;
vm
.
errorMessage
=
'
Foobar
'
;
vm
.
$nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelector
(
'
.node-health-message-container a
'
).
getAttribute
(
'
href
'
)).
toBe
(
'
/foo/bar
'
,
);
done
();
});
});
});
});
ee/spec/javascripts/geo_nodes/components/geo_node_item_spec.js
View file @
0d442d26
...
...
@@ -13,6 +13,7 @@ const createComponent = (node = mockNode) => {
primaryNode
:
true
,
nodeActionsAllowed
:
true
,
nodeEditAllowed
:
true
,
geoTroubleshootingHelpPath
:
'
/foo/bar
'
,
});
};
...
...
@@ -147,8 +148,11 @@ describe('GeoNodeItemComponent', () => {
vm
.
isNodeDetailsFailed
=
true
;
vm
.
errorMessage
=
err
;
Vue
.
nextTick
(()
=>
{
expect
(
vm
.
$el
.
querySelectorAll
(
'
p.health-message
'
).
length
).
not
.
toBe
(
0
);
expect
(
vm
.
$el
.
querySelector
(
'
p.health-message
'
).
innerText
.
trim
()).
toBe
(
err
);
expect
(
vm
.
$el
.
querySelectorAll
(
'
p.node-health-message
'
).
length
).
not
.
toBe
(
0
);
expect
(
vm
.
$el
.
querySelector
(
'
p.node-health-message
'
).
innerText
.
trim
()).
toContain
(
err
);
expect
(
vm
.
$el
.
querySelector
(
'
p.node-health-message a
'
).
getAttribute
(
'
href
'
)).
toBe
(
'
/foo/bar
'
,
);
done
();
});
});
...
...
ee/spec/javascripts/geo_nodes/components/geo_nodes_list_spec.js
View file @
0d442d26
...
...
@@ -11,6 +11,7 @@ const createComponent = () => {
nodes
:
mockNodes
,
nodeActionsAllowed
:
true
,
nodeEditAllowed
:
true
,
geoTroubleshootingHelpPath
:
'
/foo/bar
'
,
});
};
...
...
locale/gitlab.pot
View file @
0d442d26
...
...
@@ -4938,6 +4938,9 @@ msgstr ""
msgid "Geo|Pending verification"
msgstr ""
msgid "Geo|Please refer to Geo Troubleshooting."
msgstr ""
msgid "Geo|Project (ID: %{project_id}) no longer exists on the primary. It is safe to remove this entry, as this will not remove any data on disk."
msgstr ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment