Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
94
Merge Requests
10
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
431b7de0
authored
Feb 12, 2024
by
Your Name
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Agent update fix
parent
848ff728
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
+6
-5
circle/circle/settings/base.py
+4
-4
circle/vm/operations.py
+2
-1
No files found.
circle/circle/settings/base.py
View file @
431b7de0
...
...
@@ -532,7 +532,6 @@ LOGIN_REDIRECT_URL = "/"
AGENT_DIR
=
get_env_variable
(
'DJANGO_AGENT_DIR'
,
join
(
unicode
(
expanduser
(
"~"
)),
'agent'
))
# AGENT_DIR is the root directory for the agent.
# The directory structure SHOULD be:
# /home/username/agent
...
...
@@ -544,12 +543,13 @@ AGENT_DIR = get_env_variable(
#
try
:
git_env
=
{
'GIT_DIR'
:
join
(
join
(
AGENT_DIR
,
"agent
-linux"
),
'.git'
)}
git_env
=
{
'GIT_DIR'
:
join
(
join
(
AGENT_DIR
,
"agent
"
),
".git"
)}
AGENT_VERSION
=
check_output
(
(
'git'
,
'log'
,
'-1'
,
r'--pretty=format:
%
h'
,
'HEAD'
),
env
=
git_env
)
except
:
AGENT_VERSION
=
Non
=
(
join
(
SITE_ROOT
,
'locale'
),
)
print
(
"LEGACY VERSION:
%
s ------"
%
AGENT_VERSION
)
#### NEW ####
####
...
...
@@ -563,8 +563,8 @@ except:
try
:
with
open
(
"
%
s/versions.txt"
%
AGENT_DIR
,
"r"
)
as
f
:
AGENT_VERSIONS
=
loads
(
f
.
read
())
print
(
"-----KONWN VERSIONS-----"
)
print
(
AGENT_VERSIONS
)
print
(
"-----KONWN VERSIONS-----"
)
print
(
AGENT_VERSIONS
)
except
:
print
(
"Format ERROR in versions.txt !!!! "
)
# TODO more error reposrting
AGENT_VERSIONS
=
None
...
...
circle/vm/operations.py
View file @
431b7de0
...
...
@@ -1588,7 +1588,8 @@ class AgentStartedOperation(InstanceOperation):
self
.
instance
.
_set_hostname
(
parent_activity
=
activity
)
new_version
=
settings
.
GET_AGENT_VERSION_BY_SYSTEM
(
agent_system
)[
0
]
if
agent_system
and
new_version
and
(
old_version
is
None
or
old_version
and
new_version
!=
old_version
):
# if agent_system and new_version and (old_version is None or ("NOAGENTUPDATE" not in old_version and new_version != old_version)) :
if
agent_system
and
new_version
and
old_version
and
"NOAGENTUPDATE"
not
in
old_version
and
new_version
!=
old_version
:
try
:
self
.
instance
.
update_agent
(
parent_activity
=
activity
,
agent_system
=
agent_system
)
...
...
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