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
Commit
6d2a86a7
authored
Oct 22, 2026
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
agentupdate
parent
744c1885
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
19 deletions
+22
-19
circle/common/operations.py
+7
-3
circle/manager/mancelery.py
+2
-1
circle/storage/tasks/periodic_tasks.py
+1
-0
circle/templates/info/resize.html
+6
-5
circle/vm/operations.py
+6
-10
No files found.
circle/common/operations.py
View file @
6d2a86a7
...
...
@@ -16,7 +16,8 @@
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
from
inspect
import
getargspec
from
logging
import
getLogger
#from logging import getLogger
from
celery.utils.log
import
get_task_logger
from
django.core.exceptions
import
PermissionDenied
,
ImproperlyConfigured
from
django.utils.translation
import
ugettext_noop
...
...
@@ -24,7 +25,8 @@ from django.utils.translation import ugettext_noop
from
.models
import
(
activity_context
,
has_suffix
,
humanize_exception
,
HumanReadableObject
)
logger
=
getLogger
(
__name__
)
logger
=
get_task_logger
(
__name__
)
#logger = getLogger(__name__)
class
SubOperationMixin
(
object
):
...
...
@@ -305,7 +307,9 @@ class Operation(object):
kwargs
)
activity
,
allargs
,
auxargs
=
self
.
__prelude
(
kwargs
)
allargs
[
'activity'
]
=
activity
return
self
.
_exec_op
(
allargs
,
auxargs
)
sync_ret
=
self
.
_exec_op
(
allargs
,
auxargs
)
logger
.
info
(
"sync_ret
%
r"
,
sync_ret
)
return
sync_ret
def
check_precond
(
self
):
pass
...
...
circle/manager/mancelery.py
View file @
6d2a86a7
...
...
@@ -15,6 +15,8 @@
# You should have received a copy of the GNU General Public License along
# with CIRCLE. If not, see <http://www.gnu.org/licenses/>.
import
logging
import
sys
from
celery
import
Celery
import
common.serializers
from
celery.signals
import
worker_ready
...
...
@@ -30,7 +32,6 @@ HOSTNAME = "localhost"
QUEUE_NAME
=
HOSTNAME
+
'.man'
AUTO_MIGRATION_CRONTAB
=
getenv
(
'AUTO_MIGRATION_CRONTAB'
,
'0 0 * * *'
)
def
crontab_parser
(
crontab
):
fields
=
crontab
.
split
(
' '
)
return
dict
(
...
...
circle/storage/tasks/periodic_tasks.py
View file @
6d2a86a7
...
...
@@ -33,6 +33,7 @@ def garbage_collector(timeout=15):
:param timeout: Seconds before TimeOut exception
:type timeout: int
"""
logger
.
error
(
"Garbage collector started"
)
for
ds
in
DataStore
.
objects
.
all
():
queue_name
=
ds
.
get_remote_queue_name
(
'storage'
,
priority
=
'fast'
)
files
=
set
(
storage_tasks
.
list_files
.
apply_async
(
...
...
circle/templates/info/resize.html
View file @
6d2a86a7
...
...
@@ -356,14 +356,15 @@
<li>
<p>
{% trans "Extend LVM:" %}
<code>
lvextend -L
</code>
+
<strong>
2.6G
</strong>
<code>
/dev/mapper/cloud--x--vg-root
</code>
<code>
lvextend -l +100%FREE
</code>
<code>
/dev/mapper/cloud--x--vg-root
</code>
# or size: lvextend -L +
<strong>
2.6G
</strong>
/dev/mapper/cloud--x--vg-root
</p>
<pre>
Rounding size to boundary between physical extents: 2.60 GiB
Extending logical volume root to 41.36 GiB
Logical volume root successfully resized
</pre>
...
Logical volume cloud-x-vg/root successfully resized.
</pre>
</li>
<li>
...
...
circle/vm/operations.py
View file @
6d2a86a7
...
...
@@ -29,6 +29,7 @@ import os
import
time
from
celery.contrib.abortable
import
AbortableAsyncResult
from
celery.exceptions
import
TimeLimitExceeded
,
TimeoutError
from
celery.utils.log
import
get_task_logger
from
django.conf
import
settings
from
django.core.exceptions
import
PermissionDenied
,
SuspiciousOperation
from
django.core.urlresolvers
import
reverse
...
...
@@ -59,7 +60,7 @@ from .tasks.local_tasks import (
from
common.safe_celery_get
import
safe_celery_get
logger
=
get
L
ogger
(
__name__
)
logger
=
get
_task_l
ogger
(
__name__
)
class
RemoteOperationMixin
(
object
):
...
...
@@ -788,6 +789,7 @@ class SaveAsTemplateOperation(InstanceOperation):
try
:
self
.
instance
.
_cleanup
(
parent_activity
=
activity
,
user
=
user
)
except
:
logger
.
error
(
"Cleanup error"
)
pass
if
with_shutdown
:
...
...
@@ -1593,6 +1595,7 @@ class AgentStartedOperation(InstanceOperation):
self
.
instance
.
_set_time
(
parent_activity
=
activity
)
self
.
instance
.
_set_hostname
(
parent_activity
=
activity
)
logger
.
info
(
"Agent_Started in instance:
%
s sys:
%
s ver:
%
s"
,
self
.
instance
,
agent_system
,
old_version
);
new_version
=
settings
.
GET_AGENT_VERSION_BY_SYSTEM
(
agent_system
)[
0
]
# 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
:
...
...
@@ -1712,19 +1715,12 @@ class UpdateAgentOperation(RemoteAgentOperation):
_vers
,
_dir
=
settings
.
GET_AGENT_VERSION_BY_SYSTEM
(
agent_system
)
queue
=
self
.
_get_remote_queue
()
instance
=
self
.
instance
if
agent_system
==
"Windows
"
:
if
agent_system
!=
"Linux
"
:
executable
=
sorted
(
os
.
listdir
(
_dir
))[
0
]
data
=
self
.
create_windows_tar
(
agent_system
)
elif
agent_system
==
"Linux"
:
executable
=
""
data
=
self
.
create_linux_tar
(
agent_system
)
else
:
# Legacy update method
executable
=
""
return
agent_tasks
.
update_legacy
.
apply_async
(
queue
=
queue
,
args
=
(
instance
.
vm_name
,
self
.
create_linux_tar
())
)
.
get
(
timeout
=
60
)
data
=
self
.
create_linux_tar
(
agent_system
)
checksum
=
md5
(
data
)
.
hexdigest
()
chunk_size
=
1024
*
1024
...
...
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